How do I recover data from a snapshot?
I messed up my server upgrading Python and can no longer log into it. I created a snapshot of the image and now want to build a new image and recover data from the snapshot. I don't want to restore the entire snapshot as I'll just get another image I can't log into.
Is there a way to mount the snapshot such that I can create a new Linode, mount the snapshot and recover files from it?
Thanks!
1 Reply
✓ Best Answer
When you restore the snapshot, you restore it to your new Linode. After the restore, you modify the Configuration for your new Linode so that your restored volume(s) are known to your new new Linode as /dev/sdb, /dev/sdc, etc.
After you reboot your new Linode and log in, create a directory (call it /restore) on which to mount your restored volume. Then you mount it as usual:
mount /dev/sdb /restore
Then, you'll access your files through the /restore directory: /restore/this/is/the/path/to/the/file.txt
When you restore your snapshot, it will take up part of the total disc space allowed for your Linode plan. You need to make sure you have enough so don't allocate all your available plan disc space to your new Linode. The amount you need will include the swap volume of your old Linode (which you'll want to delete right away).
This isn't hard…just tedious…and you need to pay attention to what you're doing.
-- sw