Live data from Hacker News

The wrong way to switch operating systems on your server

figbert.com

11–20 of 77 posts

Re: The wrong way to switch operating systems on your server

#11

Spent three days fighting with this and didn't think to try the -v flag on his apparently-hanging process?

My first thought, also always run long running jobs like this in Screen or Tmux! As it is, it's a good learning post that others should be able to build on (and don't hit control-c just bc it's taking too long!)

Re: The wrong way to switch operating systems on your server

#12
What a nightmare! I swear I had something similar with rsync on a mac once, I was very certain it finished, ran again and it reports it's done. I migrate and I'm missing all these files! Although it was probably my fault, I really don't trust rsync anymore... Maybe it had to do with HFS+ and those strange aperture libraries but man it ruined my day (week).

Sure migrating is 100 times more relaxed when you have the old system running, but sometimes you need to reinstall. I had only one MacBook, now I only have 1 server.

What you could do in that case is just install a new disc, unplug the old one until the new systems is running. It's worth the money and effort.

I'm looking to install NixOS to my Home Server next week. All my personal infra is in Docker compose, on Ubuntu 20.04 atm. I only have one m.2 slot in the server and I don't want to buy a second drive just for this... So I'm sweating already. Maybe I should first migrate to my nuc, then back to the new server... hmmmm...

Re: The wrong way to switch operating systems on your server

#13
post #5

Someone tell me if I'm missing something, but isn't the whole point of hosting things in a virtual environment so that when you want to switch/upgrade OSes, you stand up a second server and start migrating apps over one at a time? I can't understand why that doesn't done here.

Well the title is "The Wrong Way to Switch Operating Systems on Your Server" so it's unsurprising that it's describing completely the wrong way to do things.

The concerning part is that the author seems to have learned the wrong lessons from doing things the wrong way.

Re: The wrong way to switch operating systems on your server

#14

Don't consider it a backup until you've successfully restored the data from it. The first thing I do after setting up a new data backup is test a restore of the data. Only after that will I feel confident that the backup procedure works right. In the article author's case, an attempt to restore would have caught the problem of the missing .env files and the large movie files. As for the Ctrl-C on both the backup and…

> Don't consider it a backup until you've successfully restored the data from it.

Ouch! I back up every 2 hours - should I REALLY restore from each of those?

Re: The wrong way to switch operating systems on your server

#15
I feel like a lot of this article really should be about how bad tarsnap is. Defaults to no progress updates, has no builtin multithreading, has failures around large files, can't backup sym links properly, no builtin way to detect an in progress restore so you have to manually tell it to resume, etc.

If tarsnap didn't have a bad UX, this entire article would have instead been 'the time I forgot to backup my .env file', none of the other issues would have occurred.

Re: The wrong way to switch operating systems on your server

#17
> I woke and the backup was finished! I wiped the VPS

Just this single line made me scream in horror.

Let me get this straight. He launched some backup command, it didn't output anything for hours, he suspected it hadn't done anything, aborted with ctrl-c, and then learned that he aborted it at 90%. Wipes the partial backup, starts again.

After _that_ experience, he blindly trusts the result of _the same tool_, blindly wipes everything? Wtf.

Re: The wrong way to switch operating systems on your server

#18

Don't consider it a backup until you've successfully restored the data from it. The first thing I do after setting up a new data backup is test a restore of the data. Only after that will I feel confident that the backup procedure works right. In the article author's case, an attempt to restore would have caught the problem of the missing .env files and the large movie files. As for the Ctrl-C on both the backup and…

> Don't consider it a backup until you've successfully restored the data from it. Ouch! I back up every 2 hours - should I REALLY restore from each of those?

No, not ALL backups, just the first backup you do: you test that you can restore the data from it.

Then you can be confident that following backups will be restorable.

Corrolary: If you introduce a new folder for another service in your backup, make sure you can restore it too.

Re: The wrong way to switch operating systems on your server

#19
post #18

Earlier quoted context omitted.

> Don't consider it a backup until you've successfully restored the data from it. Ouch! I back up every 2 hours - should I REALLY restore from each of those?

No, not ALL backups, just the first backup you do: you test that you can restore the data from it. Then you can be confident that following backups will be restorable. Corrolary: If you introduce a new folder for another service in your backup, make sure you can restore it too.

:itsatrap:

It needs to be done periodically.

Re: The wrong way to switch operating systems on your server

#20
post #5

Someone tell me if I'm missing something, but isn't the whole point of hosting things in a virtual environment so that when you want to switch/upgrade OSes, you stand up a second server and start migrating apps over one at a time? I can't understand why that doesn't done here.

Well the title is "The Wrong Way to Switch Operating Systems on Your Server" so it's unsurprising that it's describing completely the wrong way to do things. The concerning part is that the author seems to have learned the wrong lessons from doing things the wrong way.

Yep, the correct title would be "There is no Right Way to Switch Operating Systems on Your Server" Just don't do it. Fire up a new one, and migrate everything over.
Post reply on HN