Open-source project
rsnapshot/rsnapshot avatar
rsnapshot/rsnapshot

rsnapshot: one rsync per day, and the interval that loses a backup when a host is down

a tool for backing up your data using rsync (if you want to get help, use https://lists.sourceforge.net/lists/listinfo/rsnapshot-discuss)

3,689 stars271 forksPerlGPL-2.0

At a glance

What is it?
rsnapshot is a Perl snapshot tool built on rsync and hard links, with no module dependencies, that automates through cron and rotates named tiers of intervals. The parts worth understanding are the ones that bite: only the lowest interval actually syncs, higher tiers inherit the oldest snapshot of the tier below, and enabling link_dest means an unreachable host leaves no latest backup at all.
Who is it for?
rsnapshot suits a machine where you want many restore points for the space cost of one copy, and it asks you to understand the tier model before you trust it, because the higher intervals borrow snapshots from the tier below rather than holding their own. Two decisions deserve a second look.
Can I use it commercially?
Yes, with conditions. GPL-2.0 is a copyleft licence: if you distribute software that includes it, you must release that software's source code under the same licence. Running it internally without distributing it does not trigger that obligation.
Is it still maintained?
Yes. The repository last received commits 36 days ago.
What is it written in?
Mainly Perl, according to GitHub's language statistics.

Answers come from the project's GitHub data, last synced on November 15, 2026, and from our analysis. They are not legal advice.

From daily snapshots

Star history

  • rsnapshot/rsnapshot3,689 ★ · +6
Star history
Repository2026-09-242026-11-15
rsnapshot/rsnapshot3.7k3.7k

6 Stars in the last 52 days, measured from the daily GitHub snapshot. Compare with other projects

Editorial analysis

The tested platform list stops at Fedora 18 and IRIX 6.5

The compatibility section names twenty operating systems and most of them are older than the tool's own release history. Debian 3.0 woody, RedHat 7.x, RedHat Enterprise Linux 3.0 ES, Fedora Core 1 and 3, CentOS 3 through 7, WhiteBox Enterprise Linux 3.0, Slackware 9.0, SuSE 9.0, FreeBSD 4.9-STABLE, OpenBSD 3.x, Solaris 8 on both SPARC and x86, and IRIX 6.5. The newest entries on the list are Debian 9.9 stretch and Fedora 18, and nothing after that appears even though the branch received a push on 2026-08-13 and the current release is 1.5.1. Read as a floor rather than a ceiling it is still true, since the README states the tool should work on any reasonably modern Unix-compatible OS and is tested with Perl 5.12.0 upwards. Read as a compatibility statement it is a document about the platforms of the last decade rather than the present one.

Only the lowest interval does the rsync

This is the mechanism the whole tool turns on. Every operation happens inside a single cron run, and the run walks from the highest interval down to the lowest, rotating as it goes. Only the lowest interval actually copies data with rsync. Every interval above it does nothing but rotate snapshots around, which is why a three-level setup with daily, weekly and monthly still costs one pass over the data rather than three. The order matters as well: the README is explicit that backups are done from the highest interval first and go down, and that if cron does not invoke the lowest interval then that interval must not be listed in the config at all, with the example being to comment out `alpha` so `beta` becomes the floor. There is one exception, via `sync_first`, where the `sync` pseudo-interval performs the rsync and every real interval only rotates.

A higher interval inherits the oldest snapshot of the one below

Rotation has a consequence that is easy to miss until a restore fails. When a higher interval rotates, the snapshot it promotes to its own newest slot is the oldest snapshot of the interval one step below it. The README's example: with `daily` and `weekly` configured and `daily` set to keep thirty snapshots, the newest snapshot of `weekly` becomes the thirty day old `daily` snapshot after a rotation. So weekly is not a separate copy of the data, it is a pointer into the daily pool, and if the daily pool is shorter than thirty entries the weekly tier silently points at something younger than its name implies. Retention is configured per interval with a `retain` line, and `retain alpha 6` means each run of `alpha` creates a new snapshot, rotates the old ones and keeps the most recent six, named `alpha.0` through `alpha.5`. The number of snapshots you keep is therefore the number you name in the config, not something the tool infers from a schedule.

link_dest drops the last good snapshot when a host is unreachable

The second compatibility notice is a warning about how you choose between two methods, and it is the most operationally important paragraph in the file. If your rsync is 2.5.7 or later you may want `link_dest` enabled in `rsnapshot.conf`. On Linux without the `cp` problem described next door, you should enable `cmd_cp` instead, especially if `link_dest` is not on. Then comes the cost: `link_dest` does not do well with unavailable hosts. Specifically, if a remote host is unavailable while `link_dest` is in use, there will be no latest backup of that machine at all, and a full re-sync is required when it comes back. The other methods preserve the last good snapshot instead, which avoids that re-sync. The README says it hopes to streamline this in the future, which is an honest admission that the trade is unresolved rather than a recommendation.

GNU cp 5.9 broke it until 1.2.9 started trimming slashes

The first compatibility notice is versioned history. Systems with GNU cp version 5.9 or later have problems with rsnapshot versions up to and including 1.2.3, but only if `cmd_cp` is enabled and points at the later `cp`. The fix arrived in 1.2.9, and the mechanism is specific: rsnapshot began stripping trailing slashes when running `cp`. So the same configuration behaves differently depending on both the rsnapshot version and which `cp` is first on the path, which is why the notice is phrased as a range of versions rather than a single bad release. It is also a useful illustration of the general shape of the two notices: neither is about rsync semantics, and both are about the behaviour of the external commands rsnapshot shells out to. That dependency on system tools is the price of having no module dependencies at all.

configtest and a dry run come before cron

The configuration path is short. The default file is `/etc/rsnapshot.conf`, though the exact path depends on how the program was installed, and if it does not exist you copy `/etc/rsnapshot.conf.default` over it and edit. The sanity check is one command:

code
$ rsnapshot configtest

If that passes, `rsnapshot -t` with an interval name shows essentially what a real run would do without doing it, and the cron entry itself is two lines:

code
0 */4 * * *     /usr/local/bin/rsnapshot alpha
50 23 * * *     /usr/local/bin/rsnapshot beta

which yields six `alpha` snapshots a day at 0, 4, 8, 12, 16 and 20 hours, plus a `beta` at 23:50. The three-level example replaces that with a nightly `beta`, a Saturday `gamma` at 23:00 and a monthly `delta` at 22:00 on the first. Note the odd minutes, 50 and 22: every snapshot in a day lands on the hour, so spreading the runs avoids all of them competing for the same disk at the same minute.

A Travis file beside the GitHub Actions workflows

The top level shows an autotools project that has changed its CI twice. There is a `.travis.yml`, which is the configuration for a service this project no longer uses, sitting next to a `.github/` directory containing two workflows, one for tests and one for publishing. Build machinery is `configure.ac`, `autogen.sh`, `autoclean.sh` and `Makefile.am`, so a checkout is bootstrapped the long way rather than through a single build script, and `.perltidyrc` records the formatting rules the code is expected to follow. Tests live in `t/` rather than `tests/`. Two standalone Perl programs sit at the root, `rsnapshot-diff.pl` and `rsnapshot-program.pl`, alongside `rsnapshot.conf.default.in`, which is the template the installed default config is generated from. Documentation is in `docs/`, including a `HOWTO` and an upgrade note for anyone coming from 1.1.6 or earlier.

A release candidate and a release twenty four minutes apart

The tag list is short and the intervals are long. `1.4.5` was published 2022-12-27, then `1.5.1-rc0` on 2025-01-27 at 01:37 UTC and `1.5.1` the same morning at 02:01, twenty four minutes later. So a major feature line shipped after more than two years and the release candidate was public for less than half an hour, which is long enough to be a tag and too short to be a test window for anyone who happened to be watching. The branch itself was pushed on 2026-08-13, well after the release, so what is on master is newer than what is published. The licence is GPL-2.0 with a `COPYING` file at the root, and the warranty notice in the header is unusually blunt about it: rsnapshot comes with absolutely no warranty. Support is a SourceForge mailing list, and the project asks that questions and general discussion go there rather than to the issue tracker.

Editorial conclusion

rsnapshot suits a machine where you want many restore points for the space cost of one copy, and it asks you to understand the tier model before you trust it, because the higher intervals borrow snapshots from the tier below rather than holding their own. Two decisions deserve a second look. Use link_dest only if you accept that an unreachable remote host leaves no latest backup and forces a full re-sync, since the alternative preserves the last good snapshot. And check that your lowest configured interval is the one cron actually invokes, because an interval that is configured but never called is exactly the case the README warns about. Keep the tier retain counts long enough that the weekly snapshot you expect still exists, run configtest and the dry run before trusting a cron entry, and remember the published release is older than the branch.

Frequently asked questions

How do I use rsnapshot?

Install it, copy /etc/rsnapshot.conf.default over /etc/rsnapshot.conf and edit it, then run `rsnapshot configtest` as a sanity check and `rsnapshot -t` with an interval name to see what a real run would do. Automate it from cron. The man page is the full reference for configuration options, and the HOWTO covers install, configure and letting users restore their own files.

How do I set up rsnapshot on a schedule?

With cron calling one interval per run, for example `0 */4 * * * /usr/local/bin/rsnapshot alpha` and `50 23 * * * /usr/local/bin/rsnapshot beta`, which gives six alpha snapshots a day plus a nightly beta. Three tiers are done the same way, with a nightly beta, a Saturday gamma and a monthly delta on the first.

What is the difference between a retain count and an interval in rsnapshot?

An interval names a rotation tier such as alpha, beta or daily, and retain sets how many snapshots that tier keeps, so `retain alpha 6` keeps alpha.0 through alpha.5. Only the lowest interval listed actually runs rsync; the higher ones just rotate, and each rotation promotes the oldest snapshot of the tier below into its own newest slot.

What is the difference between a snapshot and a backup in rsnapshot?

In rsnapshot terms a snapshot is one named slot in a rotation tier, created by hard-linking to the previous one through rsync so that unchanged files cost nothing. Retention is per interval with a retain line, and a higher interval's newest snapshot is the oldest snapshot of the interval below it, so the tiers share data rather than duplicating it.

Official sources

  1. License: GPL-2.0
  2. Project website
  3. README
  4. Releases
  5. rsnapshot/rsnapshot on GitHub
Add this badge to your README

If you maintain this project, the badge below links readers to this analysis and shows its maintenance status from the daily GitHub snapshot. Paste the markdown into your README; add ?metric=license or ?metric=stars to the image URL for a different field.

Add this badge to your README

markdown
[![Hysen Labs](https://hysenlabs.com/badge/rsnapshot-rsnapshot.svg)](https://hysenlabs.com/projects/rsnapshot-rsnapshot)

Star history chart for your README

markdown
[![Star history](https://hysenlabs.com/chart/rsnapshot-rsnapshot.svg)](https://hysenlabs.com/projects/rsnapshot-rsnapshot)

Was this useful?