Update 'backup'
parent
78b581ed82
commit
87b8f36f86
9
backup
9
backup
|
@ -3,14 +3,15 @@
|
||||||
# config
|
# config
|
||||||
instances_dir=$HOME/instances
|
instances_dir=$HOME/instances
|
||||||
backups_dir=$HOME/backups
|
backups_dir=$HOME/backups
|
||||||
tmpdir=/tmp/minecraft-backup
|
tmpdir=$backups_dir/tmp
|
||||||
backup_timestamp=`date +%Y-%m-%d_%H.%M.%S`
|
backup_timestamp=`date +%Y-%m-%d_%H.%M.%S`
|
||||||
|
|
||||||
echo "WARNING: This script is deprecated and will be reworked to support incremental backup soon."
|
echo "WARNING: This script is deprecated and will be reworked to support incremental backups soon."
|
||||||
# desired features:
|
# desired features:
|
||||||
# - incremental backups
|
# - incremental backups
|
||||||
# - converter from old backups to incremental backups
|
# - converter from old backups to incremental backups
|
||||||
# - override options for config instead of hardcoded values
|
# - override options for config instead of hardcoded values
|
||||||
|
# - display total time it took to make the backup
|
||||||
|
|
||||||
# make sure it is there
|
# make sure it is there
|
||||||
mkdir -p -v "$tmpdir"
|
mkdir -p -v "$tmpdir"
|
||||||
|
@ -20,4 +21,6 @@ tar cvf "$tmpdir/$backup_timestamp.tar" "$instances_dir"
|
||||||
echo "Compressing backup..."
|
echo "Compressing backup..."
|
||||||
xz -z --best -T0 "$tmpdir/$backup_timestamp.tar"
|
xz -z --best -T0 "$tmpdir/$backup_timestamp.tar"
|
||||||
# move to destination
|
# move to destination
|
||||||
mv -v "$tmpdir/$backup_timestamp.tar.xz" "$backups_dir"
|
mv -v "$tmpdir/$backup_timestamp.tar.xz" "$backups_dir"
|
||||||
|
|
||||||
|
echo "WARNING: This script is deprecated and will be reworked to support incremental backups soon."
|
Loading…
Reference in New Issue