Multiple remotes in GUI: one for LAN, one through Internet, both = same result

I’m pretty tech-savvy, but new to Duplicacy. Exploring how I could use it to replace CrashPlan soon. I’m on Mac.

I setup my user folder as a repository, copied my exclusions from my CrashPlan config into the $HOME/.duplicacy/filters file, and setup a SFTP remote to my Linux server on my LAN at home.

I am wondering what is the best way to be able to backup to that SFTP server when I am home, and when I am not. (The hostname & port to use to connect are different, when I am not home.)

I can already detect when I am not home using some shell scripts, which modify my $HOME/.ssh/config file, allowing me to always connect to my Linux server using the same name/alias from the command line, but I’m pretty sure Duplicacy can’t use this alias.

So my first idea is to create two copies of $HOME/.duplicacy/preferences, and when I detect I leave or arrive home, I would change the $HOME/.duplicacy/preferences symlink to point to the correct copy, and restart duplicacy.
Is this the best approach I could implement?

Or can I somehow configure the Duplicacy GUI to try two different remotes, and whichever works at any time would be used, and the other would just log an error that says can't connect (or similar).

Pointers, suggestions & comments welcome.

Thanks,

  • Guillaume

The GUI version doesn’t support backing up to multiple storages from the same repository.

I would suggest using the CLI version instead. This wiki page explains how to set up multiple storages in details: Back up to multiple storages

OK thanks.
I saw in other threads you talked about an upcoming GUI using a web interface. Is that ongoing in a Github repo somewhere? I’d like to help.

  • Guillaume

PS The technique I mentioned seems to work fine. As I switch network location, the preferences file gets replaced, and restarting the Duplicacy GUI picks up the new values, and backup continue as scheduled. Yay.

Guillaume, I actually have a question about this.

I use duckdns.org to manage my dynamic IP… and I have duplicacy configured to always backup to my “external” address…

I note that when I am home- the backup runs quickly (sftp like you) and when I am away- the backup still runs but runs slowly.

I sort of took it for granted that somehow (??) when I am home, the traffic is going local … otherwise why would the backup run fast at home?

Anyway- do you think I am wrong about this? I am now wondering how the heck it is so fast when I am home even though I am still telling duplicacy to use my “external” duckdns.org address…

I dont know enough about networking…

Some routers allow devices on the local network to connect to others using the external IP address or the router, and the NAT (port forwarding rules) configured on the router. Mine doesn’t, so I can’t do that.
That is called hairpinning: https://en.wikipedia.org/wiki/Hairpinning
When hairpinning isn’t enabled on a router, it will not go slower, it will just not connect. So if you can connect when you’re on your LAN, that is very probably what is happening.

  • Guillaume

Hmm, I do this sort of thing, although not with duplicacy. For duplicacy, I always back up offsite (to cloud providers).

When I do similar things, I use a DNS name. When I’m inside my LAN, that DNS name resolves to a local address (192.168.*.*). But when I’m outside my LAN, that DNS name resolves to an outside address that can make it through my firewall on an encrypted channel.

I use Cloudflare (an amazing service, and absolutely free for my needs). My router, pfSense, will immediately update Cloudflare via API when it’s external address changes.

In this way, I can use applications that work seemlessly if I’m inside my LAN or out and about.

Just a suggestion, hope this helps!