What is the best way to restore jobs after OS reinstall?


#1

Considering that recreating the database is very slow process i was wondering what is the best way to restore jobs after os reinstall? My backup jobs are mostly to google drive.


#2

Jobs (and global settings) are not stored in the backups in anyway.
To bring them from an old OS to a new one would require exporting the job to a file on the old OS then importing from the file on the new one.

Note that I don’t know of any way to carry global settings over like that other than export a job “as command line” then manually copy/paste the global settings into the new OS.

An easier option is to copy over the folder with Duplicati-server.sqlite in it (this should include Duplicati-server.sqlite, dbconfig.json, and any job-specific sqlite files with names like CTAKXYLMWD.sqlite).

If you don’t have either of these available, then you’ll need to manually recreate the job in the GUI, point it to the (already existing) destination and wait for the database recreate to finish. :frowning:

Note that you can always do a “Direct restore from backup files…” without any job created yet - so in theory you could include your Duplicati-sever.sqlite file then exported job JSON files in your backup and manually restore them to get the jobs back.

It’s not super clean - and we’re hoping to improve on it - but it’s an option.


#3

Is there a way to save a ob to a file via the command line? Duplicati automates my backups, now I want to automate the backup of my backup obs.


#4

Can I export backup jobs from the command line? suggested a third-party client that talks to Duplicati server which uses both the server and job databases to merge the details needed for jobs to run or to be exported.

Export backups

The export command enables building backup configuration files through the CLI.

Integration between command line and web interface #2693

The commandline interface is intentionally separate from the server.


#5

Does this mean that job-specific sqlite files have always the same name as indicated in the job itself and therefore I can backup + reuse these as long I point the job to their correct directory?


#6

No - each job is given a new db name on creation / import. However, you can use the job Database menu to change what database a job points to. Alternatively, you could rename the database file to match where the job is pointing.


#7

In my experience, it seems to give me an error though, I can’t recall the exact steps to reproduce this unfortunately