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

Renaming of backup directories may affect Smartrecycle and keep backup logic #471

Closed
framps opened this issue Apr 1, 2022 · 4 comments
Closed
Labels
enhancement Enhancement request Implemented
Milestone

Comments

@framps
Copy link
Owner

framps commented Apr 1, 2022

The current logic assumes all backup directories were created by raspiBackup and follow a strict naming convention. If users manually rename backup directories for SR the wrong daily backup may be deleted and for keep backup the number of kept backups will be less than configured.

Make the SR and keep logic robust to ignore any other directories or write an error message and abort the backup if those kind of directories are detected.

@framps framps closed this as completed Apr 4, 2022
@framps framps reopened this Apr 4, 2022
@framps
Copy link
Owner Author

framps commented Apr 4, 2022

Both keep and SR strategy assume the backup directories of <hostname> start with <hostname>/ <hostname>, followed by the backup type followed by the backup creation date and time.

Example: <backupPath>/raspberrypi-bullseye/raspberrypi-bullseye-rsync-backup-20220404-224207

If the subdirectories don't follow this naming convention the strategies are screwed up. Thus it's important to add an additional check during startup all existing backup directories follow this naming convention and abort the backup run.

@framps
Copy link
Owner Author

framps commented Apr 12, 2022

Every backup run will check whether the existing backup directories follow the backup directory naming used by raspiBackup. If there exist any other backup directories raspiBackup will terminate with error message RBK0273E

@bcutter
Copy link

bcutter commented May 29, 2022

Is this the reason for removing this in the 0.6.7 config update?

# >>>>> OPTION DELETED in config version "0.1.6" <<<<<
# DEFAULT_USE_HARDLINKS=1

I was/am using this for my rsync-Backups. Not sure if those still work as before udating to 0.6.7 and I really could find nothing about DEFAULT_USE_HARDLINKS in whole https://www.linux-tips-and-tricks.de/de/raspibackup/#alphabetisch :-( Same for RSYNC_IGNORE_ERRORS="23 24" which I use for reasons.

@framps
Copy link
Owner Author

framps commented May 29, 2022

Good catch 👍

In one of the first releases of raspiBackup you could set DEFAULT_USE_HARDLINKS=1 to 0 to use rsync if no hardlink support of the underlying filesystem is available. This option is obsolete for a long time already and if you use rsync there has to be hardlink support of the underlying filesystem. Otherwise rsync cannot be used. That's why I removed this option from the config file.

Re RSYNC_IGNORE_ERRORS="23 24" it's not officially documented because it's discouraged to be used but mentioned at some places as a way to disable raspiBackup termination for these RCs and thus can still be used.

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

No branches or pull requests

2 participants