Create the backup tarball explicitly before invoking tar (#703)

When grocy is installed on a btrfs file system, the tar command
fails if the tarball is not created first.
This commit is contained in:
Shane Kerr
2020-04-07 11:43:54 +02:00
committed by GitHub
parent bfb46494cf
commit cc012c7348

View File

@@ -12,6 +12,7 @@ pushd `dirname $0` > /dev/null
backupBundleFileName="backup-`date +%d-%m-%Y-%H-%M-%S`.tgz"
echo Making a backup of the current installation in ./data/backups/$backupBundleFileName
mkdir -p ./data/backups > /dev/null
touch ./data/backups/$backupBundleFileName
tar -zcvf ./data/backups/$backupBundleFileName --exclude ./data/backups . > /dev/null
find ./data/backups/*.tgz -mtime +60 -type f -delete