mirror of
https://github.com/brunofontes/linuxShortcuts.git
synced 2024-11-23 23:40:51 +00:00
feat(MinecraftBackup): now using Borg instead of zBackup
This commit is contained in:
parent
b8495afbba
commit
f2095563b3
@ -10,7 +10,7 @@ if [[ -z $publicBackup && -z $otherBackup ]] ; then
|
|||||||
exit 0
|
exit 0
|
||||||
fi
|
fi
|
||||||
|
|
||||||
BACKUPDIR="/home/bruno/Backups/zBackup-Minecraft/backups"
|
BACKUPDIR="/home/bruno/Backups/Minecraft-borg"
|
||||||
SERVERDIR="/home/bruno/Apps/Minecraft"
|
SERVERDIR="/home/bruno/Apps/Minecraft"
|
||||||
PUBLICDIR="$SERVERDIR/BedrockServer_Public_19132"
|
PUBLICDIR="$SERVERDIR/BedrockServer_Public_19132"
|
||||||
SURVIVALDIR="$SERVERDIR/BedrockServer_Survival_19132"
|
SURVIVALDIR="$SERVERDIR/BedrockServer_Survival_19132"
|
||||||
@ -49,7 +49,7 @@ if [[ $publicBackup ]]; then
|
|||||||
runPublic "say ^usave query\n"
|
runPublic "say ^usave query\n"
|
||||||
finishedPublic=$(tail -n 4 "$PUBLICDIR/$LogFile")
|
finishedPublic=$(tail -n 4 "$PUBLICDIR/$LogFile")
|
||||||
done
|
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"
|
runPublic "say ^usave resume\n"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
@ -85,9 +85,9 @@ if [[ $otherBackup ]]; then
|
|||||||
finishedSurvival=$(tail -n 4 "$SURVIVALDIR/$LogFile")
|
finishedSurvival=$(tail -n 4 "$SURVIVALDIR/$LogFile")
|
||||||
done
|
done
|
||||||
|
|
||||||
/bin/tar c "$SURVIVALDIR/worlds" | zbackup --non-encrypted backup "$BACKUPDIR/$BACKUPDATE/Survival"
|
borg create --stats --compression auto,zstd,9 "$BACKUPDIR::$BACKUPDATE-MncftSurvival" "$SURVIVALDIR"
|
||||||
/bin/tar c "$CREATIVEDIR/worlds" | zbackup --non-encrypted backup "$BACKUPDIR/$BACKUPDATE/Creative"
|
borg create --stats --compression auto,zstd,9 "$BACKUPDIR::$BACKUPDATE-MncftCreative" "$CREATIVEDIR"
|
||||||
runSurvival "^u"
|
runSurvival "^u"
|
||||||
runSurvival "save resume\n"
|
runSurvival "save resume\n"
|
||||||
fi
|
fi
|
||||||
|
borg prune --keep-within=3d --keep-hourly=96 --keep-weekly=8 --keep-monthly=6 "$BACKUPDIR"
|
||||||
|
Loading…
Reference in New Issue
Block a user