I have a few mapped network locations (can also map them as drive letters) from my NAS, I want to back these up to Google Drive. I have a backup repo setup but the web GUI only lets me pick C: drive as a backup source…how do i backup my network shares? (windows user)
On Windows it is a problem, and many backup tools struggle with this. Crashplan for example, says:
The Code42 app doesn’t support backing up mapped drives on Windows, including network drives that are mounted by a user. This is due to a restriction built-in to Windows at the operating system level.
The reason is that the process cannot see drives mounted by another user. That would have been OK—you could have also mounted the drive as admin as well, but this is another windows’ limitation—it does not allow having two connections to the same server with different credentials. So if you run duplicacy as admin, it won’t be able to read network disks mounted as another user. Some backup tools (like Arq) implement a workaround by launching a helper process, impersonating that user, to access the data and pipe it to the service that runs as admin. Dupliacy does not do that (yet? Because it totally should!).
So you have two three options:
- Run duplicacy not as an admin, but as that specific user. Then it will see mounted drive.
- Your NAS likely supports other protocols than SMB, such as SFTP. You can use
rclone mount
to mount NAS drive over SFTP into some temp location on your Windows machine (e.g. in pre-backup script), and backup that temp location. - Run duplicacy on the NAS directly; as a bonus, you might be able to take advantage of filesystem snapshots to get more consistent backups.
4th option - run in Linux but not on NAS. There are no issues there with using mounted drives no matter what the endpoint is, you can certainly mount all your NAS exports as SMB shares and backup these. Obviously this needs some knowledge of Linux, but fairly minimal. If you don’t have access to a Linux machine, you can run it in a virtual machine on Windows.
Or WSL1. No VM required!
Unfortunately all my efforts are fruitless as the Web version cannot use google drive anymore it seems and I have no interest in the CLI version.
the Web version cannot use google drive anymore
This is not true.
- Compile the duplicacy CLI with impersonation support
- Replace the duplicacy CLI binary that came with duplicacy web with the new one.
- Use the modify token file with impersonation.
- Profit.
but web is just a single binary…so if i replace it, i wont have the web version anymore. I don’t understand.
I already built the new CLI from your blog post and from git directions, so i have it ready. If i run it, it doesn’t stay running like the web version it just runs and wants arguments and then quits.
Web version is just a wrapper: scheduler and launcher. It uses duplicacy CLI to do actual work.
Look under .duplicacy_web/bin folder. You’ll find duplicacy CLI there. Replace it with your newly built version.
wow I think that is working, i see files showing up my GDrive! You’ve been a huge help. do i need to prevent the web version from trying to replace that down the road?
Also I guess I need to set this up as a service somehow, i’m barely above noob level for linux, i’m running this on a Ubunter server 22.04 VM
Yes, this won’t hurt, see this thread on how to do it Disable automatic duplicacy CLI update
I’m not sure what Linux is using today — upstart or serviced or systemd or whatever else, but you would need to read man pages for your service manager create a service description. Google the servie manager name and you’ll find instructions, like this one How to create a systemd service in Linux