Restore backup partial fix

* Force overwrite on backup restore
* Fix date-time spec in list-backup so it can be fed back
  to rdiff-backup
* TODO: stop server before restore and/or notify user
This commit is contained in:
Jorge Juan 2015-07-29 10:10:01 +02:00
parent 6aa6238949
commit 686a9006db

4
mscs
View File

@ -1277,7 +1277,7 @@ worldBackupList() {
# Grab the list of backups for the world server.
$RDIFF_BACKUP --parsable-output -l $BACKUP_LOCATION/$1 |
while read SEC TYPE; do
date --date=\@$SEC -Iseconds
date --date=\@$SEC --rfc-3339=seconds | tr ' ' T
done
fi
}
@ -1291,7 +1291,7 @@ worldBackupList() {
worldBackupRestore() {
if [ -d $BACKUP_LOCATION/$1 ]; then
worldBackup "$1"
execute "$RDIFF_BACKUP -r $2 $BACKUP_LOCATION/$1 $WORLDS_LOCATION/$1" $USER_NAME
execute "$RDIFF_BACKUP --force -r $2 $BACKUP_LOCATION/$1 $WORLDS_LOCATION/$1" $USER_NAME
fi
}