Hello! I want to do a backup of the same files to 2 different HDDs, keeping one HDD offline and one HDD connected, swapping the HDDs in regular intervals.
What is the recommended way to do so? Should I use 2 different backup-jobs, turning one jobs on and the other off when swapping the discs? Or could I use just one backups-job running “always”, and just switching the HDDs make duplicati recognise which files need to update on every backup-run? The last solution would be much simpler, not getting messed up by turning on/off the wronge backup-jobs by mistake.
Duplicati keeps track of the storage using a local database, and if the database does not match the storage, you get an error.
So simply swapping the disks will result in error if they are not synchronized before the backup runs.
One way to do this is to use a sync tool, and then make sure to sync the disks. But this requires that the other disk is available, which I think is not what you want.
Another way would be to store the local database on the drive itself. Then you can freely swap the two disks. The downside for this is that both the storage and the database queries are done to the same disk, which may slow it down as the two operations interfere. If you are using the UI, you can edit the path to the database in the “Database …” section, and on the commandline you can use --dbpath.
You can also script your way out of it, by having a startup script that detects which disk is plugged in, and then changes the --dbpath parameter to match the disk. This would allow you to keep the database on the main drive, but it requires a bit of manual setup.
Another way would be to store the local database on the drive itself. Then you can freely swap the two disks
I do exactly this.
Please note that you have to set both disks to mount to the same location (in Windows: same drive letter). And I make sure I always plug in the drive before starting duplicati.
Be aware that the logs will be inconsistent / mixed up between 2 disks. But this never made problems for backup/restore.