0

I installed rsnapshot and configured it to make backup every hour. But the issue is all backups that are made not working. Let me explain to you, I made 3 backups hourly.0, hourly.1 and hourly.2.

  • hourly.0 : there are 15 files
  • hourly.1 : there are 14 files (I removed one file)
  • hourly.2 : there are 15 files (I recreated an other file)

The problem is when I went to backup of hourly.1 I found the file that I created in hourly.2, so I tried to remove it again but unfortunately the file that I removed ended up being removed in all my folders (hourly.0, hourly.1 and hourly.3), which means the all of those folders are just a symbolic links not more.

This is my file configuration:

  #rsnapshot
  config_version    1.2
  snapshot_root /var/Majjane-Save/
  cmd_cp        /bin/cp
  cmd_rm        /bin/rm
  cmd_rsync /usr/bin/rsync
  cmd_logger    /usr/bin/logger
  cmd_du        /usr/bin/du
  cmd_rsnapshot_diff    /usr/bin/rsnapshot-diff
  retain        hourly  24
  verbose       2
  loglevel  3
  logfile   /var/log/rsnapshot.log
  lockfile  /var/run/rsnapshot.pid
  exclude       /var/www/clients/
  exclude       /var/www/apps/
  backup    /var/www/   localhost/var/Majjane-Save/

Note : i solved the issue , in the fact it was about the symbolic links. i were run the backup just the symbolic links no more. now its work well.

Rui F Ribeiro
  • 55,929
  • 26
  • 146
  • 227

1 Answers1

1

Here is the timeline of events.

  1. The first backup made by rsnapshot will be hourly.0.
  2. When the second backup is made by rsnapshot, it first renames hourly.0 to hourly.1 and the proceeds to create a new hourly.0.
  3. When the third backup is made by rnapshot, it first renames hourly.1 to hourly.2, renames hourly.0 to hourly.1, and then creates hourly.0.

Thus the oldest (first) backup in this scenario is now called hourly.2 and the newest (most recent) is always called hourly.0.

Links are made between the backups, so that the file hourly.0/data/etc/hosts might well be the same file as hourly.1/data/etc/hosts and hourly.2/data/etc/hosts. If you were then to edit the real /etc/hosts, the next backup would not link to the existing hourly.1/data/etc/hosts but would proceed to take a fresh copy of /etc/hosts as hourly.0/data/etc/hosts.

roaima
  • 107,089
  • 14
  • 139
  • 261