Impl. backup rotation scheme keeping at least 1 copy of all files #8068
-
I am trying to implement a backup rotation scheme with Borgbackup2. My concern is, how to CHOOSEFILES |
borgbackup2 create --paths-from-stdin --paths-delimiter "\0" --verbose --stats ::'{hostname}-{now}'
borgbackup2 prune --list --match-archives '{hostname}-*' --show-rc \
--keep-daily 7 --keep-weekly 4 --keep-monthly 6
borgbackup2 compact My (beginner) mental model about what happens:
Is my understanding right? If yes, is it guaranteed, that even in case I only keep the last archive: do I still posses a copy of all my files in this last archive? |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 5 replies
-
borg2 is still in beta testing, so I assume this is not your only backup. A1: if you use delete or prune, borg logically deletes chunks if their refcount reaches 0, so it is not just removing the references. this might change in future though, see the breaking tickets. A2: presence checks are done for chunks, not for files. of course, small files might be just 1 chunk. A3: compact physically removes the already deleted chunks (see A1) from the segment files. it takes an old segment file with such "holes" and writes all non-deleted chunks to a new, compact, smaller segment file. If you keep some archive, you will have all files that you put into it at the time you created that archive. Logically, every borg archive is a "full" backup. |
Beta Was this translation helpful? Give feedback.
-
Sure, this was a theoretical example to assert: Logically, every borg archive is a "full" backup.
Life is about taking risks. And, I am confident that you guys will publish v2 soon (and maybe add more features at
Thank you. I did not find this (for me important) confirmation in the docs! Another question: Does this last archive rule guarantee, that even the clumsiest |
Beta Was this translation helpful? Give feedback.
borg2 is still in beta testing, so I assume this is not your only backup.
A1: if you use delete or prune, borg logically deletes chunks if their refcount reaches 0, so it is not just removing the references. this might change in future though, see the breaking tickets.
A2: presence checks are done for chunks, not for files. of course, small files might be just 1 chunk.
A3: compact physically removes the already deleted chunks (see A1) from the segment files. it takes an old segment file with such "holes" and writes all non-deleted chunks to a new, compact, smaller segment file.
If you keep some archive, you will have all files that you put into it at the time you created that archive. Log…