bupstash icon indicating copy to clipboard operation
bupstash copied to clipboard

Do a backup of a remote directory to a local repository

Open andrewchambers opened this issue 5 years ago • 8 comments

If we want to backup a remote directory to a local repository, how might we make that work?

Suppose we have permission to log into a remote machine, but the remote machine does not have permission to login to our server, we should be able to perform 'put' of a remote directory.

This doesn't necessarily have to be a builtin command, but perhaps a script or tutorial that does the correct ssh invocations.

andrewchambers avatar Nov 20 '20 12:11 andrewchambers

User feedback:

To expand on the need for this: it’d be useful for people who wish to back up from (e.g.) a vps to their home server, without exposing the home server to the internet. That’s my use-case anyway. It’s cheaper for me to put a big disk in my home server than it is to hire a hosted box.

andrewchambers avatar Nov 20 '20 13:11 andrewchambers

We technically only need to send ephemeral keys to the client, and we can configure the serve into put only mode for the user.

$ bupstash rput --host ssh://$server  $PUTARGS
export BUPSTASH_RPUT_CONNECT_COMMAND="ssh $OPTS $HOST"

andrewchambers avatar Aug 04 '21 00:08 andrewchambers

Or add to bupstash a client mode analogous to the server mode so that the local machine (home pc, central backup server) would use SSH to start the client on the remote machine and connect its input and output to a local bupstash in server mode. This wouldn't require anything about SSH access to the local machine or local server configuration as the local machine could fully specify options and parameters of both the remote and local client calls.

tlotze avatar Nov 14 '22 17:11 tlotze

Bupstash already speaks over stdin/stdout

tionis avatar Nov 14 '22 17:11 tionis

Bupstash already speaks over stdin/stdout

Yes, I noticed as soon as I sent the comment and I actually updated it while you replied. Sorry.

tlotze avatar Nov 14 '22 17:11 tlotze

Another option is to include an sftp client in bupstash so that it is able to pull files directly from a remote machine without being installed there.

andrewchambers avatar Nov 15 '22 04:11 andrewchambers

Another option is to include an sftp client in bupstash so that it is able to pull files directly from a remote machine without being installed there.

Would this have any benefits over a sshfs FUSE mount besides convenience and no dependecy on sshfs?

tionis avatar Nov 15 '22 14:11 tionis

sshfs is an unmaintained project - but I suppose it would amount to the same thing.

andrewchambers avatar Nov 16 '22 00:11 andrewchambers