Borg: Backup remote server to the local machine

Created on 29 Jun 2016  路  11Comments  路  Source: borgbackup/borg

Hi!

Can I use borg for backup remote server to the local machine?
Should I use sshfs or something like this should work:

borg create -s -p backup::home ssh://user@server:port:/home

In docs I saw only vise versa examples: backup local machine to the remote server(remote repo).

Most helpful comment

This is not what I asked.
I do not want use 'remote repositories', I want use 'local repositories' and do the backup of remote server.

Scheme of transferring data:

content of remote server -> local machine (local repositories)

All 11 comments

This is not what I asked.
I do not want use 'remote repositories', I want use 'local repositories' and do the backup of remote server.

Scheme of transferring data:

content of remote server -> local machine (local repositories)

search for pull workflow, there are some basic docs for it, but its not supported in general yet

Ok, I done this by using sshfs, but I got mount point in names of backup files:

$ sudo sshfs -d -p 5333 root@server:/ /mnt
$ sudo borg create -s -p backup::home /mnt/home
$ sudo borg list backup::home
Enter passphrase for key /home/buran/backup: 
drwxr-xr-x root   root          0 Wed, 2016-06-29 14:20:15 mnt/home
-rw-r--r-- root   root          5 Wed, 2016-06-29 14:20:15 mnt/home/test

Is there a way to specify something like a basename and get 'bare-metal' paths in backups:
'/home' instead of 'mnt/home'?

Or some option for extracting like '--prune /mnt' ?

borg extract supports the --strip-components NUMBER option

Thanks!

I am in the same situation, the issue itself is resolved, but being able to backup remote locations to local repositories (via ssh) would be a great feature, imho. Can/should I create a new issue for that? I will not be able to contribute much.

See #900 and potentially other tickets. sshfs might be an option also.

Why SSHFS and not a NFS mount point?

@jeremyfritzen sshfs might be more secure and a lot of servers have sshd running anyway. If you have nfs running anyway and there are no security concerns, you can also use that.

Thanks!
Indeed, I think sshfs is better than NFS since sshd is installed by default on most of debian distributions.
Thanks!

Was this page helpful?
0 / 5 - 0 ratings

Related issues

verygreen picture verygreen  路  4Comments

TinajaLabs picture TinajaLabs  路  6Comments

ypid picture ypid  路  6Comments

chebee7i picture chebee7i  路  5Comments

enkore picture enkore  路  5Comments