laurent22 / rsync-time-backup

Time Machine style backup with rsync.
3.36k stars 443 forks source link

Expiration strategy #227

Open lawrencearabia opened 3 years ago

lawrencearabia commented 3 years ago

I have a question concerning the default expiration strategy, which is:

"1:1 30:7 365:30"

"Which means: After 1 day, keep one backup every 1 day (1:1). After 30 days, keep one backup every 7 days (30:7). After 365 days, keep one backup every 30 days (365:30)."

Concerning the first "1:1" strategy ratio: if, for example, for a passed day, I have 10 backup folders for that day, which backup folder will be keep once a new backup is invoked? It is the first one, the latest one, or another else within that day? I noticed that it is the first backup (within that day) the one that will be keep.

There is a way to change this beaviour and impose to keep the latest backup folder within a (previous) day?

I am using the following command with these option:

rsync -D --numeric-ids --links --hard-links --one-file-system --itemize-changes --times --recursive --perms --owner --group --stats --human-readable --include=.bashrc --exclude=. --log-file