mirror of
https://github.com/nextcloud/all-in-one.git
synced 2025-12-20 06:26:57 +00:00
Merge pull request #1095 from nextcloud/enh/noid/borg-logs
do not show progress for borg operations
This commit is contained in:
commit
29f3952713
1 changed files with 6 additions and 6 deletions
|
|
@ -126,14 +126,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!"
|
||||||
if [ "$NEW_REPOSITORY" = 1 ]; then
|
if [ "$NEW_REPOSITORY" = 1 ]; then
|
||||||
echo "Deleting borg.config file so that you can choose a different location for the backup."
|
echo "Deleting borg.config file so that you can choose a different location for the backup."
|
||||||
|
|
@ -146,7 +146,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..."
|
||||||
|
|
@ -168,7 +168,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
|
||||||
|
|
@ -192,7 +192,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
|
||||||
|
|
@ -326,7 +326,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