Ahtenus/minecraft-init — Issue #50: Eliminating Date on Backups
Author: jbondhus
Created: 2012-03-07 21:33:42+00:00
State: open

In order for this script to properly work with the backups script you recommended, the world tar's can't have the dates appended to them. I've modified the source code partially to eliminate them being put into folders with the day, but it's still putting dates on the end of them. Could you change this and re-post it please? I don't know enough python to do this. I just want to have it put them like this:

Backups Folder:
world
world_nether
world_end

instead of this:

Backups Folder:
world_03-07-2012
world_nether_03-07-2012
world_end_03-07-2012

```python
mc_world_backup() {
get_worlds
today="" # If you don't want a folder for each day change to today=""
for INDEX in ${!WORLDNAME[@]}
do
echo "Backing up minecraft ${WORLDNAME[$INDEX]}"

case "$BACKUPFORMAT" in
tar)
path=`datepath $BACKUPPATH/${WORLDNAME[$INDEX]} .tar.bz2 .tar.bz2`
as_user "tar -hcjf $path $MCPATH/${WORLDNAME[$INDEX]}"
;;
zip)
path=`datepath $BACKUPPATH/${WORLDNAME[$INDEX]} .zip .zip`
as_user "zip -rq $path $MCPATH/${WORLDNAME[$INDEX]}"
;;
*)
echo "$BACKUPFORMAT is no supported backup format"
;;
esac
done
}
```