Compare commits
2 Commits
87facda911
...
25f04e792b
Author | SHA1 | Date |
---|---|---|
ida schmidt | 25f04e792b | |
ida schmidt | a6d9c68363 |
|
@ -1,4 +1,6 @@
|
|||
#!/usr/bin/env bash
|
||||
tar -caf /srv/minecraft/backups/`date --iso`.tar.xz /srv/minecraft/server/
|
||||
rm /srv/minecraft/backups/`date --iso --date='14 days ago'`.tar.xz || echo "no old backups to delete!"
|
||||
|
||||
until [ ! -e /srv/minecraft/backups/`date --iso`.$i.tar.xz ]; do
|
||||
(( i++ ))
|
||||
done
|
||||
tar -caf /srv/minecraft/backups/`date --iso`.$i.tar.xz -g /srv/minecraft/backups/`date --iso`.snar /srv/minecraft/server/
|
||||
rm /srv/minecraft/backups/`date --iso --date='14 days ago'`* || echo "no old backups to delete!"
|
||||
|
|
Loading…
Reference in New Issue