mirror of
https://github.com/nextcloud/all-in-one.git
synced 2025-12-19 22:16:49 +00:00
allow to repair the integrity of the backup archive
Signed-off-by: Simon L <szaimen@e.mail.de>
This commit is contained in:
parent
480b3193d4
commit
6b91fb7ca2
5 changed files with 55 additions and 3 deletions
|
|
@ -364,6 +364,23 @@ if [ "$BORG_MODE" = check ]; then
|
|||
exit 0
|
||||
fi
|
||||
|
||||
# Do the Backup check-repair
|
||||
if [ "$BORG_MODE" = "check-repair" ]; then
|
||||
get_start_time
|
||||
echo "Checking the backup integrity and repairing it..."
|
||||
|
||||
# Perform the check-repair
|
||||
if ! borg check -v --repair "$BORG_BACKUP_DIRECTORY"; then
|
||||
echo "Some errors were found while checking and repairing the backup integrity!"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# Inform user
|
||||
get_expiration_time
|
||||
echo "Check finished successfully on $END_DATE_READABLE ($DURATION_READABLE)"
|
||||
exit 0
|
||||
fi
|
||||
|
||||
# Do the backup test
|
||||
if [ "$BORG_MODE" = test ]; then
|
||||
if ! [ -d "$BORG_BACKUP_DIRECTORY" ]; then
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue