Move ghost blog to ubuntu

I've decided to stop using Vultr's VM due to a poor experience and will migrate my blog to a new VM on DigitalOcean. Luckily, since the blog runs entirely on Docker and stores data in volumes, I only need to export these volumes and import them to resolve the issue. Here are the steps:

  1. Upload compose.yml and ghost.config.json to the new VM.

  2. On the old machine, export data from the ghostdb and ghostdata volumes:

    docker run --rm -v root_ghostdb:/data -v $(pwd):/backup alpine tar czf /backup/ghostdb.tar.gz -C /data .
    docker run --rm -v root_ghostdata:/data -v $(pwd):/backup alpine tar czf /backup/ghostdata.tar.gz -C /data .
    
  3. On the new VM, import the data for both volumes:

    docker run --rm -v ghost_ghostdata:/data -v $(pwd):/backup alpine tar xzf /backup/ghostdata.tar.gz -C /data
    docker run --rm -v ghost_ghostdb:/data -v $(pwd):/backup alpine tar xzf /backup/ghostdb.tar.gz -C /data
    
  4. Start the containers using Docker Compose:

    docker-compose up -d
    
  5. Update the DNS A record to point to the new machine, and wait about 30 minutes for the changes to propagate.