mirror of
https://github.com/nextcloud/all-in-one.git
synced 2025-12-21 23:16:59 +00:00
do not show progress for borg operations
Signed-off-by: szaimen <szaimen@e.mail.de>
This commit is contained in:
parent
ed82a41bc1
commit
ec1605d29a
1 changed files with 6 additions and 6 deletions
|
|
@ -124,14 +124,14 @@ if [ "$BORG_MODE" = backup ]; then
|
||||||
# Borg options
|
# Borg options
|
||||||
# auto,zstd compression seems to has the best ratio based on:
|
# auto,zstd compression seems to has the best ratio based on:
|
||||||
# https://forum.level1techs.com/t/optimal-compression-for-borg-backups/145870/6
|
# https://forum.level1techs.com/t/optimal-compression-for-borg-backups/145870/6
|
||||||
BORG_OPTS=(--stats --progress --compression "auto,zstd" --exclude-caches --checkpoint-interval 86400)
|
BORG_OPTS=(--stats --compression "auto,zstd" --exclude-caches --checkpoint-interval 86400)
|
||||||
|
|
||||||
# Create the backup
|
# Create the backup
|
||||||
echo "Starting the backup..."
|
echo "Starting the backup..."
|
||||||
get_start_time
|
get_start_time
|
||||||
if ! borg create "${BORG_OPTS[@]}" "$BORG_BACKUP_DIRECTORY::$CURRENT_DATE-nextcloud-aio" "/nextcloud_aio_volumes/"; then
|
if ! borg create "${BORG_OPTS[@]}" "$BORG_BACKUP_DIRECTORY::$CURRENT_DATE-nextcloud-aio" "/nextcloud_aio_volumes/"; then
|
||||||
echo "Deleting the failed backup archive..."
|
echo "Deleting the failed backup archive..."
|
||||||
borg delete --stats --progress "$BORG_BACKUP_DIRECTORY::$CURRENT_DATE-nextcloud-aio"
|
borg delete --stats "$BORG_BACKUP_DIRECTORY::$CURRENT_DATE-nextcloud-aio"
|
||||||
echo "Backup failed!"
|
echo "Backup failed!"
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
@ -140,7 +140,7 @@ if [ "$BORG_MODE" = backup ]; then
|
||||||
rm -f "/nextcloud_aio_volumes/nextcloud_aio_nextcloud_data/skip.update"
|
rm -f "/nextcloud_aio_volumes/nextcloud_aio_nextcloud_data/skip.update"
|
||||||
|
|
||||||
# Prune options
|
# Prune options
|
||||||
BORG_PRUNE_OPTS=(--stats --progress --keep-within=7d --keep-weekly=4 --keep-monthly=6 "$BORG_BACKUP_DIRECTORY")
|
BORG_PRUNE_OPTS=(--stats --keep-within=7d --keep-weekly=4 --keep-monthly=6 "$BORG_BACKUP_DIRECTORY")
|
||||||
|
|
||||||
# Prune archives
|
# Prune archives
|
||||||
echo "Pruning the archives..."
|
echo "Pruning the archives..."
|
||||||
|
|
@ -162,7 +162,7 @@ if [ "$BORG_MODE" = backup ]; then
|
||||||
done
|
done
|
||||||
if ! borg create "${BORG_OPTS[@]}" "$BORG_BACKUP_DIRECTORY::$CURRENT_DATE-additional-docker-volumes" "/docker_volumes/"; then
|
if ! borg create "${BORG_OPTS[@]}" "$BORG_BACKUP_DIRECTORY::$CURRENT_DATE-additional-docker-volumes" "/docker_volumes/"; then
|
||||||
echo "Deleting the failed backup archive..."
|
echo "Deleting the failed backup archive..."
|
||||||
borg delete --stats --progress "$BORG_BACKUP_DIRECTORY::$CURRENT_DATE-additional-docker-volumes"
|
borg delete --stats "$BORG_BACKUP_DIRECTORY::$CURRENT_DATE-additional-docker-volumes"
|
||||||
echo "Backup of additional docker-volumes failed!"
|
echo "Backup of additional docker-volumes failed!"
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
@ -186,7 +186,7 @@ if [ "$BORG_MODE" = backup ]; then
|
||||||
done
|
done
|
||||||
if ! borg create "${BORG_OPTS[@]}" "${EXCLUDE_DIRS[@]}" "$BORG_BACKUP_DIRECTORY::$CURRENT_DATE-additional-host-mounts" "/host_mounts/"; then
|
if ! borg create "${BORG_OPTS[@]}" "${EXCLUDE_DIRS[@]}" "$BORG_BACKUP_DIRECTORY::$CURRENT_DATE-additional-host-mounts" "/host_mounts/"; then
|
||||||
echo "Deleting the failed backup archive..."
|
echo "Deleting the failed backup archive..."
|
||||||
borg delete --stats --progress "$BORG_BACKUP_DIRECTORY::$CURRENT_DATE-additional-host-mounts"
|
borg delete --stats "$BORG_BACKUP_DIRECTORY::$CURRENT_DATE-additional-host-mounts"
|
||||||
echo "Backup of additional host-mounts failed!"
|
echo "Backup of additional host-mounts failed!"
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
@ -320,7 +320,7 @@ if [ "$BORG_MODE" = check ]; then
|
||||||
echo "Checking the backup integrity..."
|
echo "Checking the backup integrity..."
|
||||||
|
|
||||||
# Perform the check
|
# Perform the check
|
||||||
if ! borg check --verify-data --progress "$BORG_BACKUP_DIRECTORY"; then
|
if ! borg check --verify-data "$BORG_BACKUP_DIRECTORY"; then
|
||||||
echo "Some errors were found while checking the backup integrity!"
|
echo "Some errors were found while checking the backup integrity!"
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue