Quick comment on best method for doing a total manual backup/clone of a VM and moving it to another (whether other provider, downsizing, upsizing, etc.)?
a link or a couple of words would be great -- might save hours.
I’d strongly recommend taking frequent (automated) full backups if not using config management. With config management, you can maybe get away with only backing up application data. The best way to do it is to use something like rsync/borg in combination with ZFS/Btrfs. The idea is to take a snapshot of the filesystem and then back up the snapshot, which handles any consistency problems.
For low load systems, just using rsync/Borg by itself may be enough. The advantage of Borg is incremental, deduplicated backups.
rsnapshot is not what I meant by snapshots. I meant filesystem level snapshots that are atomic. It is an alternative to rsync/Borg, but it does not handle consistency properly (similar to rsync/Borg). It does not solve the snapshotting part of the problem.
So should I just use dd or something? Or can I actually just rsync from one root to another and that will capture all of the dependencies, nginx config, literally everything? GPT-4 tells me I can just shut off everything that might change the file system in source (nginx sshd etc.) then literally rsync from root to root with
sudo rsync -aAXv --exclude-from=exclude-list.txt --delete --numeric-ids --rsync-path="sudo rsync" / user
(the exclude list is just /dev /proc /sys /tmp /run /mnt /media /lost+found).
At a certain point you start to wonder if saving the 50 bucks a month is even worth it....
Yes just rsync should work if you are stopping everything on the first system. The second system should be completely switched off. If you can just mount the drive, that’s the way to go.
No, don't think so -- I would be going from one digital ocean VM to another. So the target machine will be in operation. I honestly might just leave it and think of some other use for the server to justify keeping it running in current state.
Thanks for explaining this though - really appreciate it.
a link or a couple of words would be great -- might save hours.