Rsnapshot : will the initial backup be retained forever

rsnapshot

When making a backup with rsnapshot, "[…] we first replicate the previous backup into a parallel directory structure, creating all the directories and making hard links to all the files.". This is all good.

I assume this implies that the initial backup will be retained forever? The "newer" backups will only point (through hardlinks) to the older backup, so I'm assuming that the actual file which any given hardlink points to needs to be retained forever to not break things?

Is this assumption right?

Best Answer

No, this is not correct. If you have multiple hardlinks to a file, it doesn't matter which one originally created the file, the file will only be deleted if the last link to the file is deleted (see the difference between a hard link as used by rsnapshot and a symbolic link) In the case of rsnapshot this means that every backup directory is self-contained and you can delete all other backup directories (including the initial one) and still have a full set of data.

Depending on how you configure rsnapshot, it will eventually delete the orginal backup set.