Duplicity backup to USB

Hi,
I’ve having following problem with Duplicity back-up
I an a daily incremental backup to USB drive.
It works fine when the USB drive is attached to the server.
When removed from server Duplicity makes the backup to follwing path /dev/mnt/backup-backup-data instead of the USB-drive.
Yhe log file only shows following message :

Feb 16 14:16:07 test-server systemd: Job dev-disk-by\x2duuid-906e0df9\x2dab4e\x2d4809\x2dac16\x2d546f0a9e41a1.device/start timed out. Feb 16 14:16:07 test-server systemd: Timed out waiting for device dev-disk-by\x2duuid-906e0df9\x2dab4e\x2d4809\x2dac16\x2d546f0a9e41a1.device.
Feb 16 14:16:07 test-server systemd: Dependency failed for /mnt/backup-drive.
Feb 16 14:16:07 test-server systemd: Job mnt-backup\x2ddrive.mount/start failed with result ‘dependency’.
Feb 16 14:16:07 test-server systemd: Job dev-disk-by\x2duuid-906e0df9\x2dab4e\x2d4809\x2dac16\x2d546f0a9e41a1.device/start failed with result ‘timeout’.
This messages shows up multiple times

Nethserver version: 7.6.1810 with latest softwareupdates applied

I’ve already tried following steps trying to resolve the error without succes

  • removed path /mnt/backup-backup-data
  • reformatted the USB drive with ext3 filesysem

I don’t understand what is the problem. If the USB drive it’s not attached to the server duplicity backup-data should goes in error. When you attache the USB drive duplicity should be return working properly.

The problem is that the backup doesn’t falls in error but continues making the backup to harddisk.

Hi @Stephane_Schoubben
I will do some tests in the evening and I will update you. It sounds a little bit strange.
Do you run the backup from Server-Manger or from CLI?

Regards.

1 Like

from server-manager, stated as automatic incremental backup-up every day at 12:00, full backup on monday

Try execute from CLI command
backup-data -b backup-data
and post result.

Hi @Stephane_Schoubben
Backup system try to have backup because you have unplugged the USB drive without unmounting it. It’s not a problem: backup finish correctly and it’s needed a sync if some files are changed. At next successful backup-data drive will be synced.

Server folder synced at next backup on USB is /mnt/backup-backup-data and it’s for this that backup continues to copy data into /mnt/backup-data also if drive it’s not attached but mounted.

Same behavior from CLI or Server-Manager and it’s all normal in my opinion.
Backup USB disk has not to be unplugged: I can’t understand this necessity.

I hope I have answered your questions. In this case you can close this Bug topic.

Regards.

Unmount of USB drive is supposed to do via ssh before detach?

Normally if u have to detach usb drive you have to unmount drive with umount command.

With removable drives, the mount point directory is still present even if the drive is not mounted and so the backup program continues to write to it.

I don’t think duplicity, or for that matter any other backup program, has the smarts to validate a removable drive is present or not. It just writes to the directory it’s told to.

Perhaps wrap the backup in a script that verifies that a subdirectory, which only exists on the removable drive and so can only be seen when the drive is mounted, is actually there before running the backup.

Cheers.

2 Likes

Unplugging USB backup drive is a security manner - keep a copy in a safe place on other location.

Yes. But you have to plug another disk and not remain without backup…

1 Like


I think dev_team has solved this “problem”.

1 Like