How to move to a new server

I have successfully migrated my node from one VPS to another. Posting here the commands I used just in case anyone else might be in a similar situation:

  1. On the old VPS under root user copied files to the new VPS (time-consuming, don’t stop the node just yet)
    rsync --ignore-existing -raz /home/user/storj/ root@49.49.49.49:/home/user/storj/

  2. Ran it again to copy differences
    rsync --ignore-existing -raz /home/user/storj/ root@49.49.49.49:/home/user/storj/

  3. Stopped the old node and removed its container
    docker stop -t 300 storagenode
    docker rm storagenode

  4. Copied files again but with the delete command this time. This deletes files in the destination directory if they don’t exist in the source directory.
    rsync --delete -raz /home/user/storj/ root@49.49.49.49:/home/user/storj/

  5. Started Storj Node Docker with parameters of the new VPS (IP, disk space, bandwidth)

Thanks for your help, guys!

5 Likes