# External SSD with urbackup

**URL:** https://dietpi.com/forum/t/external-ssd-with-urbackup/16303
**Category:** General Discussion
**Created:** [21 March 2023 09:10 UTC](https://dietpi.com/forum/t/external-ssd-with-urbackup/16303 "2023-03-21T09:10:12Z")
**Posts on this page:** 20
**Page:** 1

<div class="post-metadata">

### Author: ![dieterpi](https://dietpi.com/forum/letter_avatar_proxy/v4/letter/d/67e7ee/32.png) [@dieterpi](https://dietpi.com/forum/u/dieterpi)
#### Post date: [21 March 2023 09:10 UTC](https://dietpi.com/forum/t/external-ssd-with-urbackup/16303/1 "2023-03-21T09:10:13Z")

</div>

Hey!  
I try to get urbackup with an external SSD (on hotplug) running, but get no success.

1. how can the SSD be mounted automatically on a special mount point (/mnt/backup)?
2. how can I get write rights to write with urbackup?
3. how can I stop urbackup from writing, if the SSD is not mounted? For urbackup doesnt start writing to the internal SSD automatically?

Best regards  
dieter

---

<div class="post-metadata">

### Author: ![Jappe](https://dietpi.com/forum/user_avatar/dietpi.com/jappe/32/1788_2.png) [@Jappe](https://dietpi.com/forum/u/Jappe)
#### Post date: [21 March 2023 09:17 UTC](https://dietpi.com/forum/t/external-ssd-with-urbackup/16303/2 "2023-03-21T09:17:05Z")

</div>

> [@dieterpi](#):
>
> how can the SSD be mounted automatically on a special mount point (/mnt/backup)?

[Cloud and Backup Systems Software Options - DietPi.com Docs](https://dietpi.com/docs/software/cloud/#urbackup)

> The location of the backups can be set **prior to installing UrBackup** via `SOFTWARE_URBACKUP_BACKUPPATH` setting in `/boot/dietpi.txt`. It defaults to `/mnt/dietpi_userdata/urbackup`.
> 
> After the installation, the path can be changed via web interface:
> 
> - Select `Settings`
> - Select tab `General` → `Server`
> - Change `Backup Storage Path`
> - Click `Save`

You can mount your drive via `dietpi-drive_manager`.

> [@dieterpi](#):
>
> how can I get write rights to write with urbackup?

You can have a look into the permissions of the default backup location and use this as a reference for your custom backup location.

> [@dieterpi](#):
>
> how can I stop urbackup from writing, if the SSD is not mounted? For urbackup doesnt start writing to the internal SSD automatically?

If the SSD is not mounted there is no path where it could write to.  
Maybe I don’t understand the question completly.

---

<div class="post-metadata">

### Author: ![dieterpi](https://dietpi.com/forum/letter_avatar_proxy/v4/letter/d/67e7ee/32.png) [@dieterpi](https://dietpi.com/forum/u/dieterpi)
#### Post date: [21 March 2023 10:04 UTC](https://dietpi.com/forum/t/external-ssd-with-urbackup/16303/3 "2023-03-21T10:04:16Z")

</div>

> [@Jappe](#):
>
> You can mount your drive via `dietpi-drive_manager`.

ah,ok, thanks!  
So I mounted the drive to /mnt/backup  
But it doesnt mount automatically on hotplug. How can I achieve this?

> [@Jappe](#):
>
> You can have a look into the permissions of the default backup location and use this as a reference for your custom backup location.

the owner and group are urbackup, so I tried to change the owner and the group of /mnt/backup with `chown -cR urbackup:urbackup /mnt/backup1`, but I get no permission to do that (I’m loged in as root). Also tried with sudo, but with no success.

> [@Jappe](#):
>
> If the SSD is not mounted there is no path where it could write to.  
> Maybe I don’t understand the question completly.

If the SSD is not mounted on /mnt/backup the directory is still there. So if I start the client with unmounted SSD, the client just writes to the directory without mounted SSD.

---

<div class="post-metadata">

### Author: ![Jappe](https://dietpi.com/forum/user_avatar/dietpi.com/jappe/32/1788_2.png) [@Jappe](https://dietpi.com/forum/u/Jappe)
#### Post date: [21 March 2023 10:11 UTC](https://dietpi.com/forum/t/external-ssd-with-urbackup/16303/4 "2023-03-21T10:11:37Z")

</div>

> [@dieterpi](#):
>
> But it doesnt mount automatically on hotplug. How can I achieve this?

When you mounted it with the drive manager, it will mount automatically when files on the drive are accessed. So it would be enough to plug it in and then just do `cd /mnt/backup`. If you would run `urbackup` and save it to this location, it would be mounted automatically too.

> [@dieterpi](#):
>
> the owner and group are urbackup, so I tried to change the owner and the group of /mnt/backup with `chown -cR urbackup:urbackup /mnt/backup1`, but I get no permission to do that (I’m loged in as root). Also tried with sudo, but with no success.

What kind of filesystem has the SSD? can you show  
`ls -la /mnt/backup1`.

> [@dieterpi](#):
>
> If the SSD is not mounted on /mnt/backup the directory is still there. So if I start the client with unmounted SSD, the client just writes to the directory without mounted SSD.

Hmm weird, looks like it does not get unmounted correctly.

---

<div class="post-metadata">

### Author: ![Joulinar](https://dietpi.com/forum/user_avatar/dietpi.com/joulinar/32/57_2.png) [@Joulinar](https://dietpi.com/forum/u/Joulinar)
#### Post date: [21 March 2023 10:13 UTC](https://dietpi.com/forum/t/external-ssd-with-urbackup/16303/5 "2023-03-21T10:13:28Z")

</div>

> [@dieterpi](#):
>
> `chown -cR urbackup:urbackup /mnt/backup1`, but I get no permission to do that (I’m loged in as root). Also tried with sudo, but with no success.

What file system format your drive has? `chown` requires a Linux file system

> [@dieterpi](#):
>
> But it doesnt mount automatically on hotplug

`hotplug` is something our implementation did not offer ootb. There you would need to look into `udev` rules. Something like following could give an indication you could start with

- [https://www.baeldung.com/linux/automount-usb-device](https://www.baeldung.com/linux/automount-usb-device)
- [UDev rule that auto mounts any hot-plugged device under /media/\<label\> and works seamlessly with vfat, ntfs, etc USB storages on Arch Linux. Paste this file and reboot: · GitHub](https://gist.github.com/juancarlospaco/7f4eab1b6899c55ea90dc0ef5eea965d)

---

<div class="post-metadata">

### Author: ![dieterpi](https://dietpi.com/forum/letter_avatar_proxy/v4/letter/d/67e7ee/32.png) [@dieterpi](https://dietpi.com/forum/u/dieterpi)
#### Post date: [21 March 2023 10:22 UTC](https://dietpi.com/forum/t/external-ssd-with-urbackup/16303/6 "2023-03-21T10:22:24Z")

</div>

> [@Jappe](#):
>
> When you mounted it with the drive manager, it will mount automatically when files on the drive are accessed. So it would be enough to plug it in and then just do `cd /mnt/backup`. If you would run `urbackup` and save it to this location, it would be mounted automatically too.

If I reattach the drive and `cd /mnt/backup` it shows me nothing within. So it doesnt mount automatically on demand as it seems.

> [@Jappe](#):
>
> What kind of filesystem has the SSD? can you show  
> `ls -la /mnt/backup1`.

it is exfat.

drwxr-xr-x 2 root root  
drwxr-xr-x 7 root root

> [@Joulinar](#):
>
> What file system format your drive has? `chown` requires a Linux file system

ah, good to know! As above, it has exfat. So is there no possibility for exfat to get write rights? I need exfat to mount the SSD to windows and linux.

> [@Joulinar](#):
>
> `hotplug` is something our implementation did not offer ootb. There you would need to look into `udev` rules. Something like following could give an indication you could start with

ok, thanks. What’s about udiskie.service? Is it a good idea?

---

<div class="post-metadata">

### Author: ![Joulinar](https://dietpi.com/forum/user_avatar/dietpi.com/joulinar/32/57_2.png) [@Joulinar](https://dietpi.com/forum/u/Joulinar)
#### Post date: [21 March 2023 10:35 UTC](https://dietpi.com/forum/t/external-ssd-with-urbackup/16303/7 "2023-03-21T10:35:39Z")

</div>

> [@dieterpi](#):
>
> So is there no possibility for exfat to get write rights?

no way for exfat to have file system permission at all. What you could try it using NTFS. It’s not a Linux format as well but tries to emulate permission.

> [@dieterpi](#):
>
> What’s about udiskie.service? Is it a good idea?

Never tried something like hotplug.

---

<div class="post-metadata">

### Author: ![dieterpi](https://dietpi.com/forum/letter_avatar_proxy/v4/letter/d/67e7ee/32.png) [@dieterpi](https://dietpi.com/forum/u/dieterpi)
#### Post date: [21 March 2023 10:44 UTC](https://dietpi.com/forum/t/external-ssd-with-urbackup/16303/8 "2023-03-21T10:44:27Z")

</div>

> [@Joulinar](#):
>
> no way for exfat to have file system permission at all. What you could try it using NTFS. It’s not a Linux format as well but tries to emulate permission.

oh, pity that!  
So maby I need extra backup SSD for linux. It would be better.

---

<div class="post-metadata">

### Author: ![Joulinar](https://dietpi.com/forum/user_avatar/dietpi.com/joulinar/32/57_2.png) [@Joulinar](https://dietpi.com/forum/u/Joulinar)
#### Post date: [21 March 2023 11:14 UTC](https://dietpi.com/forum/t/external-ssd-with-urbackup/16303/9 "2023-03-21T11:14:18Z")

</div>

or give NTFS a try. Another option would to be to access files using file share like NFS, Samba, FTP or SCP. This way you could access your files on Linux from Windows.

---

<div class="post-metadata">

### Author: ![dieterpi](https://dietpi.com/forum/letter_avatar_proxy/v4/letter/d/67e7ee/32.png) [@dieterpi](https://dietpi.com/forum/u/dieterpi)
#### Post date: [21 March 2023 11:18 UTC](https://dietpi.com/forum/t/external-ssd-with-urbackup/16303/10 "2023-03-21T11:18:32Z")

</div>

> [@Joulinar](#):
>
> Another option would to be to access files using file share like NFS, Samba, FTP or SCP. This way you could access your files on Linux from Windows.

is it possible with hotplug and do urbackup can manage it?

#Edit: I see, it’s another big topic for me 😃  
For I must install NFS or Samba server and make it work with the external SSD.  
I think the easy way (and maby better transfer rates) will be to format the drive in ntfs.

---

<div class="post-metadata">

### Author: ![Joulinar](https://dietpi.com/forum/user_avatar/dietpi.com/joulinar/32/57_2.png) [@Joulinar](https://dietpi.com/forum/u/Joulinar)
#### Post date: [21 March 2023 13:27 UTC](https://dietpi.com/forum/t/external-ssd-with-urbackup/16303/11 "2023-03-21T13:27:25Z")

</div>

> [@dieterpi](#):
>
> is it possible with hotplug and do urbackup can manage it?

Basically there are 3 areas your need to take care of

1. hotplug / automatic mount functionality of your external disk
2. file system and access  
a. file system format of your external disk  
b. enable `urbackup` to be able to write to your disk
3. (optional) being able to access files on your disk using NFS, Samba, FTP or SCP

all 3 points are independent and technically not related to each other.

---

<div class="post-metadata">

### Author: ![dieterpi](https://dietpi.com/forum/letter_avatar_proxy/v4/letter/d/67e7ee/32.png) [@dieterpi](https://dietpi.com/forum/u/dieterpi)
#### Post date: [21 March 2023 15:49 UTC](https://dietpi.com/forum/t/external-ssd-with-urbackup/16303/12 "2023-03-21T15:49:33Z")

</div>

> [@Joulinar](#):
>
> hotplug / automatic mount functionality of your external disk

I will manage it with udiskie.service

> [@Joulinar](#):
>
> file system and access  
> a. file system format of your external disk

I formated it now in NTFS and try to mount it, but it shows “wrong fs type, bad option …”. So I think, I must do something to mount NTFS. But what?

Or I format in ext4 and install linux reader from disk internals to mount it on windows. Maby its better that way.

> [@Joulinar](#):
>
> enable `urbackup` to be able to write to your disk

So I chown the mount directory after mounting with urbackup:urbackup  
and it seems to work! (with ext4)

---

<div class="post-metadata">

### Author: ![Joulinar](https://dietpi.com/forum/user_avatar/dietpi.com/joulinar/32/57_2.png) [@Joulinar](https://dietpi.com/forum/u/Joulinar)
#### Post date: [21 March 2023 19:39 UTC](https://dietpi.com/forum/t/external-ssd-with-urbackup/16303/13 "2023-03-21T19:39:09Z")

</div>

> [@dieterpi](#):
>
> Or I format in ext4 and install linux reader from disk internals to mount it on windows. Maby its better that way.

At least we haven’t that good experience with such software on Mac or Windows trying to read ext4. Sooner or later they corrupted data.

> [@dieterpi](#):
>
> wrong fs type, bad option

Where do you had this error exactly?

---

<div class="post-metadata">

### Author: ![dieterpi](https://dietpi.com/forum/letter_avatar_proxy/v4/letter/d/67e7ee/32.png) [@dieterpi](https://dietpi.com/forum/u/dieterpi)
#### Post date: [21 March 2023 21:53 UTC](https://dietpi.com/forum/t/external-ssd-with-urbackup/16303/14 "2023-03-21T21:53:40Z")

</div>

> [@Joulinar](#):
>
> At least we haven’t that good experience with such software on Mac or Windows trying to read ext4. Sooner or later they corrupted data.

oh, doesnt sounds good  
So its better to format in NTFS, isnt it?  
But do I need some extra settings in fstab or smth like that?

> [@Joulinar](#):
>
> Where do you had this error exactly?

Can not say it anymore, because I’ve made NTFS now.  
The backup is running vie urbackup… vvvery sllllow 😃

---

<div class="post-metadata">

### Author: ![Joulinar](https://dietpi.com/forum/user_avatar/dietpi.com/joulinar/32/57_2.png) [@Joulinar](https://dietpi.com/forum/u/Joulinar)
#### Post date: [21 March 2023 22:06 UTC](https://dietpi.com/forum/t/external-ssd-with-urbackup/16303/15 "2023-03-21T22:06:06Z")

</div>

> [@dieterpi](#):
>
> But do I need some extra settings in fstab

Using DietPi drive manager should setup everything needed to mount NTFS drives

---

<div class="post-metadata">

### Author: ![dieterpi](https://dietpi.com/forum/letter_avatar_proxy/v4/letter/d/67e7ee/32.png) [@dieterpi](https://dietpi.com/forum/u/dieterpi)
#### Post date: [21 March 2023 22:13 UTC](https://dietpi.com/forum/t/external-ssd-with-urbackup/16303/16 "2023-03-21T22:13:06Z")

</div>

> [@Joulinar](#):
>
> Using DietPi drive manager should setup everything needed to mount NTFS drives

hmm… so I formated it in NTFS again (better then to lose data).  
the first thing that comes after pluging in the ssd is `ntfs: parse options: Unrecognized mount option windows_names`

So I press `Ctrg +C` and get the bash free for input, then go to dietpi-drive\_manager and try to mount the SSD to /mnt/backup. I get the following within the drive manager:

```auto
mount -o noatime, lazytime,rw,permissions,big_writes ... exit code: 32

```

`wrong fs type, bad option, bad superblock on /dev/sdb1, missing codepage or helper program, or other error`

---

<div class="post-metadata">

### Author: ![Joulinar](https://dietpi.com/forum/user_avatar/dietpi.com/joulinar/32/57_2.png) [@Joulinar](https://dietpi.com/forum/u/Joulinar)
#### Post date: [21 March 2023 22:36 UTC](https://dietpi.com/forum/t/external-ssd-with-urbackup/16303/17 "2023-03-21T22:36:01Z")

</div>

you could try to format the drive again (at least if no data are on)

```auto
mkfs -t ntfs /dev/sdb1

```

Next, verify the file system

```auto
lsblk -o name,fstype,label,size,ro,type,mountpoint,partuuid,uuid

```

---

<div class="post-metadata">

### Author: ![dieterpi](https://dietpi.com/forum/letter_avatar_proxy/v4/letter/d/67e7ee/32.png) [@dieterpi](https://dietpi.com/forum/u/dieterpi)
#### Post date: [21 March 2023 23:42 UTC](https://dietpi.com/forum/t/external-ssd-with-urbackup/16303/18 "2023-03-21T23:42:58Z")

</div>

> [@Joulinar](#):
>
> `mkfs -t ntfs /dev/sdb1`

give me: no such file or directory.  
It is not sdb1, but sdc1, I checked it again, but with the same result

---

<div class="post-metadata">

### Author: ![Joulinar](https://dietpi.com/forum/user_avatar/dietpi.com/joulinar/32/57_2.png) [@Joulinar](https://dietpi.com/forum/u/Joulinar)
#### Post date: [22 March 2023 00:05 UTC](https://dietpi.com/forum/t/external-ssd-with-urbackup/16303/19 "2023-03-22T00:05:02Z")

</div>

> [@Joulinar](#):
>
> `lsblk -o name,fstype,label,size,ro,type,mountpoint,partuuid,uuid`

can you share this one?

---

<div class="post-metadata">

### Author: ![dieterpi](https://dietpi.com/forum/letter_avatar_proxy/v4/letter/d/67e7ee/32.png) [@dieterpi](https://dietpi.com/forum/u/dieterpi)
#### Post date: [22 March 2023 08:21 UTC](https://dietpi.com/forum/t/external-ssd-with-urbackup/16303/20 "2023-03-22T08:21:15Z")

</div>

> [@Joulinar](#):
>
> can you share this one?

```auto
sdc1 ntfs backup 1.8T 0 part [leer] xyz xyz

```

[Next page](https://dietpi.com/forum/t/external-ssd-with-urbackup/16303.md?page=2)
