Skip to content
Snippets Groups Projects
Commit c43c578e authored by tmueller's avatar tmueller
Browse files

Backupscript

parent cf23825c
No related branches found
No related tags found
No related merge requests found
#!/bin/bash
declare -a worlds=(world world_nether)
backupdir=backup/
ext=.tar.gz
dateformat=$(date +%F_%H-%M-%S)UTC$ext
echo "Starting multiworld backup..."
if [ -d $backupdir ] ; then
sleep 0
else
mkdir -p $backupdir
fi
tar -czvf $backupdir$dateformat --exclude="plugins/dynmap" --exclude="backup" *
chmod +r $backupdir$dateformat
echo "Backup complete."
exit 0
\ No newline at end of file
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment