How do I enable Duplicati to backup my data to either an external or internal secondary hard drive? I have used rsync and cron in the past but am trying to move to a system that regularly backs up my data, can encrypt it, and pretty much does it all in the background so I don’t have to think about it.
I’m running into the same issue on multiple NixOS PCs.
I have tried the simple things, such as show hidden files, adding my username & password, etc.
I am able to see my external HD on my laptop and copy/move files to and from it. Same with my internal HD in my desktop, albeit I do have to use my user password in Gnome in order to access it.
One of my weaknesses is fully understanding storage and permissions on any distro of Linux. I am thinking that I need to somehow enable secondary hard drives (both internal and external, not the hard drive that NixOS is installed on). I am currently unable to backup my data using Duplicati on any of my systems (mainly concerned about my laptop and desktop).
I have dabbled with editing my /etc/fstab in the past, but
am not sure I even need to do so in this issue, and
not sure if there is a nixified way of handling this if it is needed.
Any help / direction is much appreciated! Let me know if you need any additional information to help diagnose what is occurring.
I have tried posting on the NixOS discourse, but no one seems to have any expertise in Duplicati there.
there is nothing mystical in the way Duplicati accesses backup drives under Linux: these devices need to be mounted before using them, and then you add the path to the mounted device in the job configuration.
So if your system is a standard Linux, ‘man mount’ should get you where you need to be.
If your particular system needs special incantations to get them mounted, the particular system forum should give you that and you can then add these incantations to mount the drive in a before backup script.
Questions should not be asked specifically about Duplicati, but in terms of general access by programs running as Duplicati runs. You can view About → System info → UserName to see what yours is using. Sometimes people who package Duplicati make different choices than the packages Duplicati provides.
https://search.nixos.org/packages will let you find Duplicati, and there is a maintainer there you can ask. There’s also no current Duplicati listed there, but Duplicati can sometimes do its own autoupdates. See:
About → System info → BaseVersionName (its original install) and ServerVersionName (may be newer)
As Duplicati team does not create NixOS packages in their specialized format, it’s a guess, but I found:
which is reminiscent of what the Arch Linux AUR packager did. It’s safer, but gets in the way of access.
Duplicati is just a program which runs as some user and is subject to the usual permissions, so find out what user it runs as, the path where it needs access (this is the mount), then see if permissions allow it.
Probably not since the complexity of accessing an USB device under this OS seem wildly overinflated; I downloaded a 3 Gb Nixos image, installed it in a KVM VM (12 GB space needed), did a redirection to a USB external hard disk that I have - it was the hardest part since it needed a 2 mn Internet search - then started the NixOs disk utility from the NixOs graphical launcher (30 s search), mounted the (Ntfs) partition (1 mn work, the mount path was displayed helpfully by the disks utility - it was /run/media/gp/ntfs, ‘gp’ being the user name I selected and ‘ntfs’ being the partition name, started Duplicati (installed via the trick pointed at by your link) with Duplicati-server, searched the mount path in the Duplicati menu, started a backup, done.
Now all this would need to be made persistent and automated sure, and I have not done this job, but accessing an external USB disk under NixOs is not rocket science. I can’t believe that no one has provided a pointer or two on this Nix forum. Gah. Will not use, consider or recommend.