Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

rsnapshot support #6

Open
ThomasWaldmann opened this issue Nov 7, 2016 · 1 comment
Open

rsnapshot support #6

ThomasWaldmann opened this issue Nov 7, 2016 · 1 comment
Labels
Milestone

Comments

@ThomasWaldmann
Copy link
Member

ThomasWaldmann commented Nov 7, 2016

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).

@ThomasWaldmann
Copy link
Member Author

ThomasWaldmann commented Nov 7, 2016

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants