i was trying to check if it would run after setting as a service w/o having the tray icon running in linux and was greeted with a fresh install type thing with none of my backup configs and it asking me if i have a multi user system and to setup a password. i didnt manually export/backup my backup configs, are they somewhere on my system to restore from?
im not sure what happened. i was messing around with grub and which drives os drive boots by default but other than that i dont think i did anything to jack with duplicati. there may have been a mono update yesterday iirc.
When you switch the user context in which Duplicati runs, the default locations for the databases change. This can make it appear that you are back to a fresh install.
If you want to keep the new user context, you can try stopping Duplicati and moving its sqlite databases from the old location to the new location. Then start Duplicati again and your configuration should be ārestored.ā
im not sure i switched the āuser contextā or maybe i dont understand what you mean? the directories are the same as from when i setup duplicati a couple weeks ago afaict.
The default run style is for the TrayIcon to launch at login, and it runs under your login context. The databases are stored in this location by default: %localappdata%\Duplicati
, which translates to C:\Users\<username>\AppData\Local\Duplicati
.
You stated in your original post that you switched it to run as a service. What user context did you set that service to? By default I believe services run under the āLocalSystemā user context, so the Duplicati databases would be stored here: C:\Windows\System32\config\systemprofile\AppData\Local\Duplicati
. (Note that this folder is normally not accessible due to UAC - you can see it using an elevated command prompt.)
There are a couple options. You can set environment variables to force Duplicati to look at the āoldā folder location for the databases. Or you can move the databases to the new location. Or you can change the service to run under your own user contextā¦
im talking linux. i guess its only slightly mentioned in my post.
oops! I missed that part.
If it runs as a service then the default location for Linux is /root/.config/Duplicati
. If it runs as a user then it should be the userās home folder, ~/.config/Duplicati
.
Do you see sqlite files in both locations?
actually this is odd, i dont remember that /root/.config
file being there and i cant get into it, it says permission denied. and yes, i have all of the files under ~/.config/Duplicati
.
You probably have to be root to see inside /root/.config
Try sudo bash
to get a root prompt.
ah ok. the only thing in /root/.config/
is keybase config stuffs. looks like all of my duplicati config is under ~/.config/Duplicati
.
Ok, well interesting⦠it shouldnāt have appeared as a fresh install if the Duplicati data folder is unchanged.
Can you check your entire system for the presence of other sqlite files just in case they are hiding elsewhere? Something like this might work:
$ sudo find / -name "*.sqlite*"
i can see that there is /root/.config/Duplicati/Duplicati-server.sqlite
via the search but if i sudo bash
into the dir and search it its not there. would it be because the service is running or something?
No, the files are visible even if Duplicati is running When you sudo bash
you would have to cd /root/.config/Duplicati
and then ls -l
should show you the files.
Youāll have to be very careful here with how you proceed. You need to make sure you correctly identify which sqlite files you want to keep, and where you want them placed, etc. If you arenāt careful you might wipe out the sqlite files you actually want to keep.
I would start by noting the exact location and timestamps on all the sqlite files on your system.
so what do you think has happened and that i should do? this is all that in the dir:
root@kinghat-neon:/root/.config/Duplicati# ls -l
total 64
drwxr-xr-x 2 root root 4096 Aug 12 17:45 control_dir_v2
-rw------- 1 root root 57344 Aug 14 10:48 Duplicati-server.sqlite
while i have the mass of them in my home
dir. so thats probably where i was operating from?
kinghat@kinghat-neon:~/.config/Duplicati$ ls -l
total 16092
-rw------- 1 kinghat kinghat 4218880 Aug 1 21:41 65686989769079886576.sqlite
-rw------- 1 kinghat kinghat 6610944 Aug 13 12:57 75846979677072689069.sqlite
-rw------- 1 kinghat kinghat 4476928 Aug 13 12:56 77908670757684897285.sqlite
-rw------- 1 kinghat kinghat 126976 Jul 31 18:55 78796866778390816889.sqlite
-rw------- 1 kinghat kinghat 122880 Jul 31 18:35 ābackup 20190731063541.sqliteā
-rw------- 1 kinghat kinghat 122880 Jul 31 19:08 ābackup 20190731070823.sqliteā
-rw------- 1 kinghat kinghat 122880 Jul 31 19:20 ābackup 20190731072029.sqliteā
-rw------- 1 kinghat kinghat 122880 Jul 31 19:30 ābackup 20190731073006.sqliteā
-rw------- 1 kinghat kinghat 122880 Aug 1 21:33 ābackup 20190801093324.sqliteā
-rw------- 1 kinghat kinghat 122880 Aug 1 12:03 ābackup 20190801120319.sqliteā
drwxrwxr-x 2 kinghat kinghat 4096 Aug 1 21:29 control_dir_v2
-rw------- 1 kinghat kinghat 278528 Aug 13 12:58 Duplicati-server.sqlite
drwxrwxr-x 2 kinghat kinghat 4096 Aug 13 12:56 updates
Yep, exactly. Duplicati before was running as your regular user, and now it is running as root (so it places its files in a different location).
First question - do you want it to run as root? Or as your regular user again?
If you want to run as your regular user, but you still want systemd to launch Duplicati on bootup as a service, then we can probably adjust your systemd configuration so that it runs as your user instead of root.
If you really do want it to run as root, then what ultimately needs to happen is the sqlite files need to be moved from your home area to the root folder. This would need to be done while Duplicati is not running, and there may be other issues. Iām thinking that the path information to where the job-specific sqlite files are stored is in the main Duplicati config. So all of those will probably need to be updated. Hereās what I see when I look at one of the backup jobs on one of my Linux machines:

Itās kind of a pain to switch user contexts after youāve been using Duplicatiā¦
ya id love for the configs to be kept in home and also have it run at system start. when i read through the posts about doing that on ubuntu i figured thats what i was doing.
Ok, maybe all you need to do is change /etc/default/duplicati
file so that DAEMON_OPTS has an additional option:
DAEMON_OPTS="--server-datafolder=/home/kinghat/.config/Duplicati"
Once you make that edit, try restarting duplicati:
$ sudo systemctl restart duplicati
This might be the simplest solution!
1 Like
ok i did that and it looks like it got my backups back but i also got these messages upon entering the web interface:

Does that folder actually exist? If so, can you see what user Duplicati is running as? I presume itās running as root, so I donāt know why it wouldnāt be able to access that folder.
You can run a command like this - it shows iām running it as root on my system:
# ps ux | grep mono
root 1089 0.4 2.1 2103856 173072 ? SNl Aug13 7:04 /usr/bin/mono-sgen /usr/lib/duplicati/Duplicati.Server.exe --webservice-interface=any --webservice-port=8200
/root/code/
doesnt appear to be a directory, no.
$ ps ux | grep mono
kinghat 15949 0.0 0.0 14424 1036 pts/0 S+ 21:08 0:00 grep --color=auto mono
$ sudo ps ux | grep mono
root 14185 0.2 0.7 1588656 117788 ? SNl 20:51 0:02 /usr/bin/mono-sgen /usr/lib/duplicati/Duplicati.Server.exe --server-datafolder=/home/kinghat/.config/Duplicati
Ok so itās no longer valid ⦠You can remove it from the list of source folders to back up.