Say I have a weekly and monthly backup configured in rsnapshot. Will the weekly backups create hard links to the same files created by a previous monthly backup (and vice versa)?
Asked
Active
Viewed 1,229 times
1 Answers
4
Yes.
On every rotation (hourly, daily, weekly, monthly), rsnapshot first does a cp -L
("copy" with hard links only), and then runs rsync
, which deletes the links and replaces them with new/updated files.
If no files change during your whole rotation, you store only one copy of all files, and a bunch of links to the same data on disk.
If you enable debugging (verbose output), you can see the actual commands rsnapshot
uses.
mulaz
- 10,472
- 1
- 30
- 37
-
Right, so there is technically no difference between running "rsnapshot daily" and "rsnapshot monthly" other than it places the links/files into separate subdirectories? – Fela Maslen Aug 26 '14 at 14:52
-
2File-wise ... there is no difference. But "daily", usually takes the last hourly folder as daily.0, and monthly takes the last weekly folder as monthly.0. Both are just "cp -L", but the folders are from different time periods. – mulaz Aug 26 '14 at 14:56
-
For example, if you have 4 hourly backups, 7 daily ones, 4 weekly and 3 monthly, the last monhtly (monthly.3) is ~4 months old. If you have 18 daily backups, the last one is just 18 days old. – mulaz Aug 26 '14 at 14:59