Migration plan check

I’ve got a small setup for friends and family and now that DigitalOcean have cheaper droplets available with 1Gb memory I want to move to a new droplet so save 50% of my costs. Just to make sure I don’t make any mistakes and totally destroy everything I would like someone to verify my plan.

  • Stop dovecot (temporary stop receiving mail)
  • Force backup using:
    cd mailinabox
    sudo management/backup.py
  • Make copy of /home/user-data/backup/secret_key.txt (just making sure)
  • Create backup image of droplet (to be able to recreate original droplet if everything fails)
  • Destroy droplet to make sure no conflicts happen when reusing hostname
  • Create new droplet with same hostname
  • install MIAB
  • restore from backup using:
    export AWS_ACCESS_KEY_ID=paste your AWS access key ID here
    export AWS_SECRET_ACCESS_KEY=paste your AWS secret access key here
    export PASSPHRASE=$(cat your_backup_secret_key_file.txt)
    sudo -E duplicity restore --force s3://s3.amazonaws.com/your-bucket-name/your-backup-path /home/user-data/

Do I need to do something to recreate the certificates as the IP address will have changed? (using letsencrypt)

1 Like

Already found one myself. After installing MIAB copy original secret key to /home/user-data/backup/secret_key.txt

Uhmm, I may be wrong but dovecot is the IMAP/POP server … you would want to stop postfix to stop incoming mail since it is the MTA. I would imagine that stopping both would be advisable.

But actually … I didn’t review the DO information on switching to a new plan closely…

Why not just make a snapshot and restore the snapshot to the new droplet? This way there is no reinstalling MiaB nor restoring backups.

if the IP address changes you will need to run sudo mailinabox to reset things up internally, but this seems a lot simpler to me. Maybe too simple and I am missing something.

Thanks for the Postfix remark, I forgot that one.

Already tried the option to transfer the image to a new droplet. But because the disk on the cheaper system is smaller they don’t support that even if the disk is filled less then 50% and should fit easily on the newer plan.