Skip to content

Instantly share code, notes, and snippets.

@btarg
Created September 25, 2019 16:20
Show Gist options
  • Save btarg/ced4323c2768a7e8de11bb1ada013e0f to your computer and use it in GitHub Desktop.
Save btarg/ced4323c2768a7e8de11bb1ada013e0f to your computer and use it in GitHub Desktop.
Minecraft backups for Google Cloud
#!/bin/bash
screen -r mcs -X stuff '/save-all\n/save-off\n'
/usr/bin/gsutil cp -R ${BASH_SOURCE%/*}/world gs://<bucket>/$(date "+%Y%m%d-%H%M%S")-world
screen -r mcs -X stuff '/save-on\n'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment