In this scenario (backup and forget): do I lose my file?

I am trying to understand something and checking my understanding. In the following scenario:

  1. I backup /foo which contains bar1 (so /foo/bar1) in a snapshot at 13:00 (snapshot A)
  2. I add bar2 to /foo at 13:30
  3. I create another snapshot of /foo at 14:00 (snapshot B)
  4. I delete bar2 from `foo at 14:30
  5. I create another snapshot of foo at 15:00 (snapshot C)
  6. I forget and prune a week later with --keep-daily 1

So, after a week, only snapshot C is kept for the day and foo/bar2 is lost from the backup. Right?

Although I have never tried “daily 1” that sounds like bar2 should be gone then, correct.

1 Like

Any policy that results with snapshot B being purged has that result. Other things to consider with your retention policy is similar results if you changed the “timed” snapshots to “daily” snapshots (ie A on day 1, B on day 2 and C on day 3), any policy that forgets snapshot C will result with the loss of bar2. You can see that using a retention of 7 daily snapshots vs 1 weekly snapshot can make a big difference.

You need to tailor your forget policy to match your work habits. This may result with keeping more snapshots around if it is necessary to recover short lived files. Perhaps moving files to trash instead of deleting them would be a better work method in this situation.

--keep-daily n for the last n days which have one or more snapshots, keep only the most recent one for each day.

Looks like that supports your theory