Rsnapshot (Rsync Based) – A Local/Remote File System Backup Utility for Linux

Download Your Free eBooks NOW - 10 Free Linux eBooks for Administrators

Ravi Saive

Simple Word a Computer Geek and Linux Guru who loves to share tricks and tips on Internet. Most Of My Servers runs on Open Source Platform called Linux.

Your name can also be listed here. Work as a Paid freelancer/writer at TecMint.

Download Free Linux eBooks

Advanced Bash-Scripting Guide
Linux Bible
A Newbie's Getting Started Guide to Linux
Ubuntu Linux Toolbox: 1000+ Commands

You may also like...

15 Responses

  1. Alfredo Barrainkua says:

    There’s a simple web app for backups with rsnapshot: ElkarBackup -www.elkarbackup.prg-.
    And it runs on any Debian/Ubuntu system. Raspberry PI included!

  2. Don says:

    I’ve been using rsnapshot since Rubel’s original article 10+ years ago. In the current incarnation the syntax of paths is easy to screw up and so testing a configuration file without actually transferring files and with verbosity is essential for debugging the configuration. Attention to detail for setting up the cron job is similarly essential. When I get these worked out I then back up both so that it is relatively easy to reinstall when things disappear after a system upgrade.

    The automatic nature of rsnapshot is fantastic but it also can lead to complacency. It is wise to check the backups from time to time to make sure they’re still being made as planned. This is especially true after a system upgrade or the transfer of a system to new hardware. Particular attention made to confirming passwordless ssh login to target systems is still in effect when changes are made. It’s really annoying to find out that important data is not backed up because some months earlier an upgrade made ssh passwords obsolete.

  3. Alexander says:

    All works fine, but the reports dont delivered to my email work, Why? I have to setup the email server function in this server? or where I put the pop and smtp servers to this work fine?
    Thanks

  4. DeDust says:

    Hey Guys,

    i found the solution. the problem was with the foward slash. it should be backward slash

    backup root@192.168.1.6:/home/ /data/backup/

    it should be like this.

    backup root@192.168.1.6:/home/ \data\backup\

  5. DeDust says:

    when i try to backup locally it works fine. but when i try to back up a remote server it gives me an error message.

    [kavinda@SVR1 ~]$ rsnapshot configtest
    —————————————————————————-
    rsnapshot encountered an error! The program was invoked with these options:
    /usr/bin/rsnapshot configtest
    —————————————————————————-
    ERROR: /etc/rsnapshot.conf on line 222:
    ERROR: backup root@192.168.1.6:/home/ /data/backup/ – Backup destination \
    /data/backup/ must be a local, relative path
    ERROR: ———————————————————————
    ERROR: Errors were found in /etc/rsnapshot.conf,
    ERROR: rsnapshot can not continue. If you think an entry looks right, make
    ERROR: sure you don’t have spaces where only tabs should be.

    My /etc/rsnapshot.conf
    backup root@192.168.1.6:/home/ /data/backup/

  6. Martijn says:

    It looks like snapshot_root is a (temporary?) local directory where the backup will be stored. I can’t have that, since my server has used, say, 25GB of storage on a 40GB disk. NFS or USB mount is not an option. Replacing the disk is also not an option (besides, I don’t want to always have double the space I actually need/use). It’s a virtual server at a provider, so everything costs money. I won’t open up NFS over the internet, and I can’t reach the server to plug in anything.

    SSH to home is the only option for me. Which is there, but for what exactly? Can rsnapshot not “simply” backup directly via SSH without the use of a local directory? rsync can do this, but I don’t see how rsnapshot would.

    Another thing, how to restore?… Say I have to rebuild my server, Ubuntu is freshly installed. Then what?

    • Ravi Saive says:

      I think, you should use Rsync over SSH, you can simply sync your remote data into your local machine at home via rsync.

      • ali says:

        thank you very much for posting such a nice and useful concepts for linux administrators..

        my problem is ..

        i have configured rnapshot…..intervals i have kept is daily.0

        according to rsnapshot.conf it should take everyday backup at night 2 30 pm..

        and it should be incremental backup..

        every day it is taking backup..tats ok

        but for me problem is it is consuming lot of bandwidth for my internet..

        tat means my internet consuming will takes place every sunday..
        tat is every sunday it is taking or consuming 8 gb of internet ..

        plz help me on this..

  7. If I am daily backing up a local directory, say /backup/ into rsnapshot directory /backup_r/, is there any way of NOT requiring /backup_r/daily.0/backup/ to be a copy, but rather a set of links to /backup, thereby saving disk space?

    Thanks.

    Lester

  8. George Bouras says:

    the claim “taking up the space of one single full backup plus differences” i do not think is true . All my 6 hoyrly backups have the same size, 13 Mb each.
    George Bouras

    • sudos says:

      No they don’t
      that’s what you see because of hard links
      actual physical space is full backups + changed files (not mere diffs)

      try creating hard links with ln and see if by yourself

  9. JJMacey says:

    Ravi,

    Thanks for the article!

    Normally to back-up files, before I wipe my H-P Spectre Ultrabook SSD, I use “ksnapshot”. The back-ups are ported to a USB drive. Obviously, “rsnapshot” has a few differences / advantages.

    Recently, I have been thinking of buying a back-up 128Gb SSD to use in case of disaster. Basically, I want to copy EVERYTHING to this new SSD, and use it to completely restore my system.

    Do you have an app preference to do this, and make my new SSD BOOTABLE?

    TIA for your response.

Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>

Join Over 62000+ Linux Users
  1. 46679
  2. 2055
  3. 10101

Enter your email to get latest Linux Howto's