From f2095563b3b9c4ec0ca441ad90371eeac3cdbffa Mon Sep 17 00:00:00 2001 From: Bruno Fontes Date: Fri, 26 Mar 2021 21:18:30 -0300 Subject: [PATCH] feat(MinecraftBackup): now using Borg instead of zBackup --- Services/minecraft-hour.sh | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/Services/minecraft-hour.sh b/Services/minecraft-hour.sh index 4aba0be..ddcefe9 100755 --- a/Services/minecraft-hour.sh +++ b/Services/minecraft-hour.sh @@ -10,7 +10,7 @@ if [[ -z $publicBackup && -z $otherBackup ]] ; then exit 0 fi -BACKUPDIR="/home/bruno/Backups/zBackup-Minecraft/backups" +BACKUPDIR="/home/bruno/Backups/Minecraft-borg" SERVERDIR="/home/bruno/Apps/Minecraft" PUBLICDIR="$SERVERDIR/BedrockServer_Public_19132" SURVIVALDIR="$SERVERDIR/BedrockServer_Survival_19132" @@ -49,7 +49,7 @@ if [[ $publicBackup ]]; then runPublic "say ^usave query\n" finishedPublic=$(tail -n 4 "$PUBLICDIR/$LogFile") done - /bin/tar c "$PUBLICDIR/worlds" | zbackup --non-encrypted backup "$BACKUPDIR/$BACKUPDATE/MncftPublic" + borg create --stats --compression auto,zstd,9 "$BACKUPDIR::$BACKUPDATE-MncftPublic" "$PUBLICDIR" runPublic "say ^usave resume\n" fi @@ -85,9 +85,9 @@ if [[ $otherBackup ]]; then finishedSurvival=$(tail -n 4 "$SURVIVALDIR/$LogFile") done - /bin/tar c "$SURVIVALDIR/worlds" | zbackup --non-encrypted backup "$BACKUPDIR/$BACKUPDATE/Survival" - /bin/tar c "$CREATIVEDIR/worlds" | zbackup --non-encrypted backup "$BACKUPDIR/$BACKUPDATE/Creative" + borg create --stats --compression auto,zstd,9 "$BACKUPDIR::$BACKUPDATE-MncftSurvival" "$SURVIVALDIR" + borg create --stats --compression auto,zstd,9 "$BACKUPDIR::$BACKUPDATE-MncftCreative" "$CREATIVEDIR" runSurvival "^u" runSurvival "save resume\n" fi - +borg prune --keep-within=3d --keep-hourly=96 --keep-weekly=8 --keep-monthly=6 "$BACKUPDIR"