I have found out that rsnapshot is great tool for backing up my stuffs for local file system. Now I need to do rsnapshot_push.conf file where I give params to rsync server. What is the right way to do this? Can I use rsync to /rsnapshot-backups/localhost/ syncing it to rsync server.

Rsnapshot is pull-based by design. The power of Rsnapshot lies in using hard links, and that only works for local file systems. (nfs could be used as it supports hard links, but not for instance sshfs).

In a push scenario, the best solution is to simply push to to a backup directory on the server using rsync, and then allow rsnapshot handle snapshotting from that directory, as it was designed to. Rsnapshot doesn't care if changes were introduced by an rsync or by saving a file.

In the rsnapshot FAQ there is a fancy solution that triggers rsnapshot after the rsync, but that could be overkill. Just running rsnapshot from its recular cron jobs works just as well.

An alternative solution is rdiff-backup, however this does not present a nice directory view of each snapshot and requires running commands to restore files, which may complicate fast restoring.

  • this would double the amount of space needed – erjoalgo Sep 5 '17 at 4:24
  • assuming only the receiver has a static IP, one option it to do a reverse ssh tunnel, then take the rsnapshot from the local port where the sender's ssh server is listening to. the sender would make 2 ssh commands, the first for the reverse tunnel, the 2nd for initiating the rsnapshot on the receiver. this could be wrapped in a cron-triggered script on the sender side – erjoalgo Sep 5 '17 at 4:28

Another option is to use a reverse ssh tunnel and then to a "remote" pull from the receiver's side:

#!/bin/bash -x
ssh -vNR 1998:localhost:22 example.com &
ssh example.com "rsnapshot -c pull-from-sender-rsnapshot.conf ${IVAL}"

where pull-from-sender-rsnapshot.conf might contain a line like:

backup localhost:1998/etc/  desktop-1

This could be invoked by cron on the sender's side, triggering the remote rsnapshot locally.

Your Answer


By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Not the answer you're looking for? Browse other questions tagged or ask your own question.