Restore duplicati settings and database to new install

Hey all, so duplicati has been running fine for a while now and I’ve moved the installation around before. I forgot how long it took after importing the backup jobs to recreate the database. Its been over 10 hours already and thats just the first backup. By this rate I’ll be done by the end of the week. I am glad it works, dont get me wrong and Im confident that when I need to recover from a disaster, that this will actually work and I can get my stuff back.

For those planned occasions however, I really need a better (read: faster) way. When I plan to move or reinstall that machine, this is taking way too long. I understand Duplicati can’t make some oneline storage facility work faster, so im not looking at speeding the process up, I just want a proper way to restore Duplicati settings and database in a reliable fashion.

So, I installed Duplicati on Rocky Linux 8, I am coming from Red Hat 8. Same thing as CentOS, different name. I have a file level backup by means of an rsync snapshot from the rhel8 machine on a NAS.

I install Duplicati on the new install by jumping through a few mandatory hoops. Before I start the duplicati service, how can I move all the settings and the database from the rhel backup to the new Rocky Linux host, so that I get everything back the way it was?

Thanks for the advise!

When I have a planned move to a new machine, I just transfer the sqlite files (Duplicati-server.sqlite plus the job-specific sqlite files). This way there is no need to import jobs or recreate databases at all. Have you tried doing this and did you run into any issues?

1 Like

Thanks, I guess not, because whenever I attempt to migrate properly, I seem to be missing some files.

I start with a list of the files owned by the package, this will cough up some files in /var/ /opt/ and /etc/. I am guessing there are files created elsewhere, not owned by that package and that I can’t find. I search with find /opt (and /var, /usr, /etc) -type f -name some-likely-phrases which listed some stuff, but apparently not what I need to do a complete migrate.

You shouldn’t transfer anything besides the sqlite files mentioned in my post. After transferring the sqlite files you would then just download and install the latest version of Duplicati on your new machine. If you did everything right, it will “just work.”

(Make sure you have shut down Duplicati on your old PC before transferring the sqlite files, and also make sure you never start it again on the old PC. You don’t want to have two Duplicati instances trying to write backups to the same destination.)

Let me know if you have any other questions.

1 Like

I thought I had already replied (I remember typing something :P).

I never realized Duplicati stores in /root/ home dir, thats where my sqlite files are located. I never noticed that before but its showing in the backup settings when I edit them.

I don’t backup home dirs on servers because I never store anything of value there and being a server, I expect settings to be stored in /etc/ or possibly in /var. My bad for asuming though, I should have checked better.

Can I move that to /etc/duplicati?

Thanks for the help!

By default Duplicati stores its sqlite files in ~/.config/Duplicati on Linux machines and %LocalAppData%\Duplicati on Windows. On Linux if you’re running it as root that means it will be in /root/.config/Duplicati.

If you really want to you can store them somewhere else. The Duplicati-server.sqlite file can be stored somewhere else if you use the --server-datafolder=path option. You can add this to DAEMON_OPTS= line in /etc/default/duplicati.

The other sqlite databases can be moved by clicking on the job in the Web UI, clicking “database …”, and then specifying the new path. Click “Save” if you’ve already moved the database manually or you can click the “Move existing database” button to have Duplicati move it for you.

Note that these sqlite files should not normally be backed up. So if you move them don’t include them in your regular backup. If wanting to back them up is your only reason for moving them, then maybe you don’t need to move them at all.

My only other word of caution is to remember that you’ve made these customizations. People tend to set-and-forget their backup configs. When they do something like move their Duplicati-server.sqlite file and then uninstall/reinstall Duplicati, the customization may be wiped out and then they panic at the apparent loss of all their backup jobs. (They aren’t really lost, it’s just that Duplicati isn’t looking in the right spot for the sqlite file any more.)

1 Like