Skip to content

Commit

Permalink
scripts: updated restore script.
Browse files Browse the repository at this point in the history
  • Loading branch information
ronoaldo committed Oct 14, 2023
1 parent c59c5fa commit d4648f8
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions scripts/restore.sh
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ log() {
FILE=$1
case $FILE in
"latest")
export FILE=s3://backups/mercurio.current.tar.gz
export FILE=gs://minetest-backups/servers/mercurio/backups/mercurio.current.tar.gz
;;
esac
if [ x"$FILE" = x"" ] ; then
Expand All @@ -29,14 +29,14 @@ fi
case $FILE in
gs://*)
log "Fetching from Cloud Storage ..."
gsutil -m cp $FILE /tmp/restore.tar.gz
export FILE=/tmp/restore.tar.gz
gsutil -m cp $FILE /var/tmp/restore.tar.gz
export FILE=/var/tmp/restore.tar.gz
log "Done. Using $FILE to restore."
;;
s3://*)
log "Fetching from S3 Storage ..."
s3cmd get --continue $FILE /tmp/restore.tar.gz
export FILE=/tmp/restore.tar.gz
s3cmd get --continue $FILE /var/tmp/restore.tar.gz
export FILE=/var/tmp/restore.tar.gz
log "Done. Using $FILE to restore."
;;
esac
Expand Down

0 comments on commit d4648f8

Please sign in to comment.