FreeNAS jail - restarted, now my duplicati config is gone?

I set up duplicati inside a FreeNAS jail a few weeks ago, got everything working, and finally finished backing up my ~850GB to the cloud.

I was preparing to migrate my FreeNAS to my other host, and just tested adding duplicati to the jail’s startup, restarting the jail. I just pulled up the duplicati web interface, and there appears to be nothing there. All settings are back to default, and there are no backup jobs listed.

How can I figure out what happened? And is there any chance to get my backup job restored? Off the bat, I see a 1.5GB .sqlite file under my ~/.config/Duplicati folder, and hopefully that contains everything, but how would I make the service load that config?

Please help, as it did take about 2-3 weeks to complete the initial backup, and I really don’t want to go through that again so soon!

Though you didn’t mention what destination you were using for your backup, I expect it is just fine. Most likely what you missed in your migration were the Duplicati-server.sqlite and dbconfig.json files.

The 1.5G .sqlite file you have is your local log of what’s been backed up. If that gets lost it can be regenerated from the destination files (though that can take a while to do).

Unfortunately, I’m not sure where those would be stored in a FreeNAS jail. However, if you can still log into the old host you could export your config to a file, then just import it into the new host. (Note that you might have to verify they dbpath parameter is pointing to the new location of the 1.5G .sqlite file).

1 Like

So I found another thing… When I restarted the jail, and had duplicati start from a startup script, it created a

/.config/Duplicati

folder. Where I found the config and .sqlite files, etc. from my running instance from before I rebooted / restarted in:

/root/.config/Duplicati

Seems like the easiest resolution would be to figure out how to get duplicati to look at /root/.config/Duplicati for its config, or overwrite /.config/Duplicati with this original config.

On a side note, is there something that is supposed to manage the control_dir_v2/lock_v2 file? Is this something that will stick around next time I reboot and cause issues when duplicati then tries to start itself?

Edit:

Phew, I moved the new /.config/Duplicati folder to /.config/Duplicati.bak, and copied my original /root/.config/Duplicati folder to /.config/Duplicati. I restarted the jail, and it looks like my backup is showing properly again, and is scheduled for its regular time tonight!

Hopefully this can save someone else a few minutes, before they freak out :wink:

1 Like

That should be internally handled by Duplicati and shouldn’t cause any problems, even after a reboot in the middle of a backup.

1 Like

Good to know, looking forward to many successful backups, and very few required restores :smile_cat:

Indeed!

Just for the sake of completeness, would you mind sharing what version of FreeNAS you’re running and why you’re using a jail instead of a Docker (if applicable to your FreeNAS version)? (In the interest of fairness I’ll admit I’m using Docker on unRAID 6.)

Thank goodness these older threads are kept in the forum :slight_smile:
I installed Duplicati 2.0.4.23_beta_2019-07-14 in my Ubuntu VM, got a number of jobs running on Saturday. used the ftp service provider to push the backup sets to a local FreeNAS machine. Nice.
Rebooted my work machine this morning, went to check on the jobs in the UI (browser hitting the service via port 8200) a short time ago discovered -> job are missing from the Home page of the GUI.

But my ~/.config/Duplicati/*.sqlite files are there. Weird.
I had saved off my config for each job, so I was able to import those json files. Ran repair. Said to myself, this can’t be a bug, must see if anyone else has a similar experience.

And then hit this support posting. So it dawned on my, when I did the install on Saturday, I launched the daemon via my account. Upon reboot, it is running as root. Sure enough, there are *.sqlite files in /root/.config/Duplicati/

sounds like a good time to use gnome-session-properties to launch Duplicati when my desktop session starts up.

Is it fair/correct for me to assume that since the EnvironmentFile used by the service definition has DAEMON_OPTS with no args present, that all I need to do is run /usr/bin/duplicati-server ?

I’ll disable the service & go with gnome to launch the daemon.

It depends a bit on the situation, but no options works in many cases. Tell a command “help” for options. FWIW I think the Windows installer starts Duplicati.GUI.TrayIcon.exe with no options, if you have it start.

Installing Duplicati on Windows
Configuring the Duplicati Tray Icon in Windows

One change though (assuming gnome-session-properties can launch things that show on the desktop) would be to launch /usr/bin/duplicati instead of /usr/bin/duplicati-server in order to have the tray icon show up. You also get a server hosted inside it, so it’s sort of a superset of what server can do.

Duplicati components explains some of this using Windows terms. On other OSs, the names may vary.

Duplicati.Server.exe and Duplicati.GUI.TrayIcon.exe get into specific options, and help can also do that.