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
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,
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
You probably have to be root to see inside
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
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
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
-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:
Once you make that edit, try restarting duplicati:
$ sudo systemctl restart duplicati
This might be the simplest solution!
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.