Giter Club home page Giter Club logo

digitalocean-starbound-backup-and-restore's Introduction

DigitalOcean Starbound Server Snapshot/Destroy and Restore.

The Problem: I only need the Starbound server to run maybe 8 hours a month. Paying $40 a month for this usage level is a waste of resources. I have considered merging this into my Docker host but for now I will keep them separate. Because of this I require a method to backup and destroy my Droplets, then restore them when they are needed.

Solution: In order to solve this, I'm leveraging DigitalOceans snapshots and destroying the server when the snapshot is complete. This will reduce my usage charges to what I actually use, and provide a versioned history of the server should something go wrong.

Dependencies:

Usage:

It should be noted that this script only targets Droplets named starbound-server.

  • From Windows (or using Vagrant in general): A Vagrantfile and provisioner have both been supplied should you decide not to directly install any necessary packages.

    1. Run vagrant up from this folder.
    2. At the time of writing, a bug exists that will cause ansible_local to fail, once vagrant up fails, run vagrant reload --provision and it should pass. (Github Issue)
    3. Run vagrant ssh and you will be able to run the script (located in do_starbound). Options for usage are listed below.
  • Environment Variables: You may supply a DigitalOcean API Key at runtime or set it to an environment variable accessible to the script. Something like export DO_API_KEY=mykey in ~/.bashrc should allow the script to autoload the key for usage.

  • Command line: There are currently 3 Command line options. --backup, --destroy, and --restore.

    • --backup: Run the snapshot against the starbound-server Droplet.
    • --destroy: This should be used along with --backup. If provided, the droplet will be destroyed after it is backed up (This provides the cost savings).
    • --restore: Run this one on its own, It will use the latest starbound-server snapshot to create a new starbound-server droplet.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.