rsnapshot support
ThomasWaldmann opened this issue · 1 comments
rsnapshot creates a dir structure like this under its root directory:
$ sudo ls -l /var/cache/rsnapshot/
drwxr-xr-x 5 root root 4096 Nov 7 01:57 alpha.0
drwxr-xr-x 5 root root 4096 Nov 7 01:57 alpha.1
drwxr-xr-x 5 root root 4096 Nov 7 01:57 alpha.2
drwxr-xr-x 5 root root 4096 Nov 7 01:57 alpha.3
drwxr-xr-x 5 root root 4096 Nov 7 01:57 alpha.4
drwxr-xr-x 5 root root 4096 Nov 7 01:57 beta.1
drwxr-xr-x 5 root root 4096 Nov 7 01:57 beta.2
drwxr-xr-x 5 root root 4096 Nov 7 01:57 beta.3
drwxr-xr-x 5 root root 4096 Nov 7 01:57 beta.4
drwxr-xr-x 5 root root 4096 Nov 7 01:57 gamma.0
... delta.0
alpha, beta, gamma, delta is the snapshot-kind name (high frequency to low frequency, e.g. alpha is every 4 hours, beta daily, gamma weekly, delta monthly - via cronjob).
.N (0..N) is just a number - 0 is newest snapshot of its kind.
Below these directories, there is another layer of directories with the "backup set" (e.g. the hostname can be used as a backup set name), e.g. .../alpha.0/myserver/.
For borg, the archive name could be myserver-alpha.0
and the timestamp for the borg archive is taken from rsnapshot directory mtime.
Alternatively, we could use myserver-DATE-TIME as archive name, but then the relationship "all these archives are in same snapshot" is less clear as the DATE-TIME slightly differs when taken from the backupset dir (we could also take it from snapshot dir, then it would be the same).
Note: using the myserver-DATE-TIME format would be rotation-tolerant. Usefuly if it is not just a one-time import, but regularly used. Backups that were already imported would map to same name again and would be rejected (assuming that mtime isn't touched), only backups with unseen timestamps would get processed.