External SSD with urbackup

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

Cloud and Backup Systems Software Options - DietPi.com Docs

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 GeneralServer
  • Change Backup Storage Path
  • Click Save

You can mount your drive via dietpi-drive_manager.

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

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

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

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.

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.

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.

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

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

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

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

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

it is exfat.

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

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.

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

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.

Never tried something like hotplug.

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

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.

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

#Edit: I see, it’s another big topic for me :smiley:
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.

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.

I will manage it with udiskie.service

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.

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

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.

Where do you had this error exactly?

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?

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

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:

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

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

mkfs -t ntfs /dev/sdb1

Next, verify the file system

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

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

can you share this one?

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