I have dbpath set to move my database to D:…\Duplicati folder. In it I have 1 .sqlite file (I have 3 active backups).
I also found today that inside C:\Users\xxxxx\AppData\Local\Duplicati I have 13 .sqlite.
Two of them are from today, 1 from 3 days ago, and the rest are older, some 2 years old.
I also have there a dbconfig.json file from 2018
- How come these .sqlite are not stored in my D:\ folder?
- Is there a way to know which .sqlite are really in use and not old leftovers?
- Can I move these files to D:?
I managed to see the database in use using Home -> backup name -> database… -> location.
I has 2 databases in C although I have the dbpath set under settings. I think this is a bug in the program.
If you wish your database to be moved (and you have a GUI install, which was made after the CLI version),
Database management has a
Location section with a
Local database path you can edit, and the
Move existing database button will become active (shown in blue), and you can click to move and remember.
Testing I just did suggests that if you set up both the Database screen and
Advanced options, the advanced option wins. If you are running from the CLI, there is no Database screen so it can’t conflict.
Your result sounds different though, but your release may differ, and some wordings are a bit ambiguous.
Can you please make a table or description of what you have for the 3 backups, showing C: or D: in GUI Database field, and which file is actually updated by a backup. I assume the dbpath is a unique path on D: for each backup, given in the backup
Options screen. The
Settings screen would be for default options.
If you wish to stay off of C: for everything including Duplicati-server.sqlite that holds information for the GUI, –server-datafolder option on the Server or TrayIcon launch can do that, or set DUPLICATI_HOME variable. There’s an easy way to set that up shown here, but I think you’re on your own to move any active files over.
Files that haven’t changed after all backups are run aren’t very interesting. Some may have backup in their names, and many of these are only useful short-term, or maybe for emergency work if active file gets lost.
The dbconfig.json file is relevant to CLI, and tries to remember things like DB location for destination URLs.
Thanks for this informed replay.
I’m using the GUI, I’m not sure what the CLI is (command line?).
under Settings -> default options I already have
At this same place, from the “Add advanced option” list I could not find a line for “server datafolder”, so I switched to edit as text and added
but then after a backup I recived an warning:
2020-10-06 20:53:05 +03 - [Warning-Duplicati.Library.Main.Controller-UnsupportedOption]: The supplied option --server-datafolder is not supported and will be ignored
Yes. Command Line Interface. Using Duplicati from the Command Line explains, if you’re curious.
That’s not going to work. It’s not a folder path. It’s the path to a backup’s DB file, ending in
Path to the file containing the local cache of the remote file database.
and such text also describes the
Local database path in the GUI Database page.
That’s because it’s not a per-backup option. It’s a server option affecting all backups.
Which path are you trying to take?
For per-backup DB, Database screen is simplest, and will move DB for you as said.
If you really prefer, you can instead add a per-job dbpath advanced option to override.
For all-backup setting including server DB, use server-datafolder/DUPLICATI_HOME.
It’s a bit of a pain to add server options and keep them around over uninstall/reinstall.
The exact method also depends on when and how you start Duplicati. Boot? Login?
Ultimately you usually wind up editing a shortcut right-click Properties to add options.
The question is which shortcut (depends on start method), and getting it to persist…
The DUPLICATI_HOME method makes this chore a little simpler. See earlier writeup.
I don’t get you… the “settings” tab holds global settings of Duplicati and not setting per backup, So I thought this would be the place for the “server datafolder”.
I manually moved all the .sqlite files to D:\ using the “backup name” -> database -> location tab.
I also deleted all the left over old databases.
I still have Duplicati-server.sqlite under C:
I do prefer adding that “server datafolder” as a setting inside Duplicati, but if there is no other way i will do that setx command
It holds default per-backup settings which are not the same as server settings.
Each backup inherits the defaults, but a given backup can override if it wishes:
If you don’t believe that, look at similarity between its list and advanced options.
Then look at the server options. You had to force yours in by hand. It doesn’t fit.
The other ways were described as more difficult. Edit Duplicati startup shortcut.
Problem with that is that uninstall/reinstall might wipe it. Renaming might help…
How to Access the Windows 10 Startup Folder
Or if you start Duplicati by hand from desktop icon, just edit the shortcut instead.
Or if you installed as Windows service, give it to Duplicati.WindowsService.exe:
It is possible to pass arguments to
Duplicati.Server.exe , simply add them to the commandline
The server gets some options only at startup, for example where its option file is.
That’s Duplicati-server.sqlite, and it can hold some other things on Settings page.
If you don’t like
setx, you can use Windows Settings to set environment variable.
Either way gives the server something it can read to know where its option file is.
Thanks for the very enlightening information, I will probably keep on reading in the links you added.
I will go with the setx option as it looks much more robust than the other options.