Using Digital Ocean Volumes - Gamocosm/Gamocosm GitHub Wiki

As your Minecraft world/server grows in size, Digital Ocean will take longer to snapshot or recreate your server. One solution to this is to move your Minecraft world to a Digital Ocean volume. Digital Ocean volumes, also known as block storage, are storage devices which exist independently of droplets (your servers). You will be billed for the volume while it is active ($0.10/GB as of 2020 May 2), but depending on the size of your server (CPU and memory) and the size of your volume (disk space), Gamocosm can still save a lot of memory.

Migrating an existing Minecraft world to use a volume

Do not simply attach a volume to an existing server. In general, the best way to migrate Minecraft worlds on Gamocosm is to:

  1. Using SCP or SFTP, download your Minecraft world and server files (the minecraft_server-run.jar, server.properties, etc.), i.e. the whole /home/mcuser/minecraft folder
  2. Create a new server. If desired, create a volume (on Gamocosm) and attach it to the new server
  3. Start the new server
  4. Stop Minecraft on the new server
  5. Using SCP or SFTP, upload your Minecraft server (to the same /home/mcuser/minecraft folder)

I deleted a server without downloading the world in the volume attached to it

If you also deleted the volume without downloading your world, you are out of luck (there should have been many warnings). Simply deleting a server on Gamocosm will never also delete any volume attached to it. Assuming you still have the volume, you will need to use SSH to retrieve the contents of your volume:

  1. Login to Digital Ocean's control panel.
  2. Create a new droplet via their UI, and under "Add block storage", click "Add Volume", and select "Attach existing". Select your volume.
  3. Under "Authentication", make sure to add your SSH key or select "One-time password"
  4. Create the droplet
  5. SSH into your server. Note that the credentials will be different from when you normally SSH into a Gamocosm server:
    • User: root
    • Password: if you selected "one-time password" above, you should receive an email from Digital Ocean with the password. If you chose "SSH keys" for authentication, you would use that instead to login
    • Port: 22 (default SSH port)
    • Example Linux command: ssh [email protected], where 1.2.3.4 is the IP address of your droplet
  6. You must manually mount your volume. See this Digital Ocean page and this Digital Ocean page
    • Your volume should be called gamocosm-your-name
    • In that case, your device path would be /dev/disk/by-id/scsi-0DO_Volume_gamocosm-your-name
    • Create a mount point: mkdir /mnt/my-volume
    • Mount your volume: mount -o defaults,discard,noatime <device path> /mnt/my-volume. Replace <device path> with the device path above
    • There should be a minecraft folder at /mnt/my-volume/minecraft. You can now download the contents of that folder using SCP or SFTP

Suspending a volume

If you suspend a volume on Gamocosm, Gamocosm will take a snapshot (backup) of your volume, then destroy the volume, much like it does with your droplets/servers. The benefit is that snapshots cost less, at $0.05/GB as of 2020 May 2 (half the price of an active volume). However, the volume must be recreated to be used/attached to a server again. Gamocosm will do this automatically for you, so there's no real need to manually reload a volume.

TL;DR: If you know you will not be using your server for a while, suspend your volume on Gamocosm