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.

  • Do not remove or edit files in the hourly.* directories. They belong to rsnapshot. – roaima May 12 '15 at 23:08
  • i know , i mean i remove the file from the originale folder that i backuped it – BAHADDOU Mohammed May 13 '15 at 8:34
  • 1
    Is it possible you are confusing how rsnapshot is numbering things. hourly.2 is the first snapshot and hourly.0 is the most recent. – StrongBad May 13 '15 at 12:24
  • Please find a file that is linked incorrectly within you backup sets, and provide ls -l for each instance of it. Please also confirm the filesystem type (ext4, FAT,etc.) on which your backups are placed. – roaima May 14 '15 at 8:55
  • 1
    It would be helpful then if you said when you created, deleted, and modified files and what is where at different time points. – StrongBad May 14 '15 at 11:48
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.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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