Live data from Hacker News

I lost my data trying to back it up

hamy.io

21–30 of 126 posts

Re: I lost my data trying to back it up

#21
post #6
post #3

why would you try this out with "live" data? why not incrementally connect drives and do it that way? i'm basically asking what the impetus was for "just going for it" which is probably going to be a reason that other people share...

Incrementally?

I assume by incrementally is meant to have a base backup and store the difference in between.

Personally I prefer full backups - they feel more complete.

Re: I lost my data trying to back it up

#22
post #10

Getting backup right is extremely important, that is why you need proper tools. For the last 10 years I have been using ZFS snapshots and replication. I keep 180 days with snapshots on the remote backup and 30 days for the local. I use it to take backup of virtual machines, different databases including "running", sql servers. And of course important files, documents and photos. I've also configured a daily mail with…

Do you use ZFS on the desktop too, or something different? I've used btrfs raid on a server before, and it worked apart one incident which took it two weeks (for 4TB of data) to recover from, so I'm probably going to move to ZFS on the next upgrade. On the desktop there seem to be many more tools for btrfs though, like timeshift [0] - effectively Time Machine for Linux.

[0] https://github.com/teejee2008/timeshift

Re: I lost my data trying to back it up

#23
post #11

Similar story but way shorter. Was working on the beginning of Typeform years ago and we had some issues in production, wanted to take a look at the logs. The logs were in a tar archive, so just needed to untar it. Mixed up the arguments in the tar command and instead overwrote the logs with a empty archive. Doh. In the end, lesson learned: be 100% sure arguments are correct if you're stupid enough to run terminal co…

Linux commands: with great power comes great responsibility. We're all seduced by the power, but quickly learn the responsibility part!

Re: I lost my data trying to back it up

#24
post #9

There's now way he could have possible known simply booting the Ubuntu live disk would do this. He could have done that without any consideration to doing a backup. However regular tried and true backups are the way to go, preferably automated. My worst horror story wasn't really mine. I did desktop support in my first job. The library had their own system and their own support arrangements but I had a good relations…

I have seen one case like this, too. Every week, the customer put a tape into the drive, the machine did something with the tape, but apparently not what it was supposed to do. So when the application running on that machine managed to scramble its (FoxPro) database, they were quite surprised to find their tapes empty. I was really happy I did not have to work on that case. ;-)

Re: I lost my data trying to back it up

#25
post #22
post #10

Getting backup right is extremely important, that is why you need proper tools. For the last 10 years I have been using ZFS snapshots and replication. I keep 180 days with snapshots on the remote backup and 30 days for the local. I use it to take backup of virtual machines, different databases including "running", sql servers. And of course important files, documents and photos. I've also configured a daily mail with…

Do you use ZFS on the desktop too, or something different? I've used btrfs raid on a server before, and it worked apart one incident which took it two weeks (for 4TB of data) to recover from, so I'm probably going to move to ZFS on the next upgrade. On the desktop there seem to be many more tools for btrfs though, like timeshift [0] - effectively Time Machine for Linux. [0] https://github.com/teejee2008/timeshift

Just stay away from raid 5/6 with Btrfs

"The parity RAID code has multiple serious data-loss bugs in it. It should not be used for anything other than testing purposes" [1]

[1] https://btrfs.wiki.kernel.org/index.php/RAID56

Re: I lost my data trying to back it up

#26
post #11

Similar story but way shorter. Was working on the beginning of Typeform years ago and we had some issues in production, wanted to take a look at the logs. The logs were in a tar archive, so just needed to untar it. Mixed up the arguments in the tar command and instead overwrote the logs with a empty archive. Doh. In the end, lesson learned: be 100% sure arguments are correct if you're stupid enough to run terminal co…

Linux commands: with great power comes great responsibility. We're all seduced by the power, but quickly learn the responsibility part!

There was a time when tar did not remove a leading / in a tar archive when unrolling it.

That required some great caution.

Re: I lost my data trying to back it up

#27
Sorry for your loss. Here are my two cents...

For complete system backup on Windows use Acronis [0], on MacOS use Carbon Copy Cloner [1] and on Linux Clonezilla [2].

Also never forget the 3-2-1 rule of backups [3], 3 copies, 2 local copies on different mediums and 1 copy offsite (cloud, remote) :-)

[0] https://www.acronis.com/en-us/personal/computer-backup/

[1] https://bombich.com/

[2] https://clonezilla.org/

[3] https://www.backblaze.com/blog/the-3-2-1-backup-strategy/

Re: I lost my data trying to back it up

#28
post #9

There's now way he could have possible known simply booting the Ubuntu live disk would do this. He could have done that without any consideration to doing a backup. However regular tried and true backups are the way to go, preferably automated. My worst horror story wasn't really mine. I did desktop support in my first job. The library had their own system and their own support arrangements but I had a good relations…

Did it end up going to data recovery? Most of the time it should be possible to retrieve most of the data, at least.

I don't actually know, I didn't directly support them and they were so embarrassed about the whole thing they clammed up.

Re: I lost my data trying to back it up

#29
Takeaways

- Your data is at most risk from yourself. Other risks such as hackers, burlgars, fire or hardware failures aren't nearly as dangerous to your data as you are.

- Backup is HARD. Have someone else do it.

- Mirroring is fine for one first copy. Whether that copy is raid or just another NAS or something, but there should always be a proper BACKUP too.

- To be a proper backup it should be 1) Write only/snapshotting, so even if you remove all your local files, the deltions aren't mirrored. 2) Have long retention. When you mess up a document you want to be able to notice 2 years later and just fetch that version 3) Be off site so theft and fire doesn't risk the primary copy and the backups.

Re: I lost my data trying to back it up

#30
post #18

I think the moral of the story is; always use software RAID. Hardware RAID (even fake ones like Intel) are time bombs, either you have fun configurations like this or the controller dies and no replacement exists. Unless you'd absolutely need a HW RAID, I'd go for a Software RAID that mounts and works natively in Linux. I can put the harddrives into a fully foreign computer and it would work.

I had this happen eleven years ago, when an integrated hardware RAID controller in a Dell server decided to literally blow up. Oddly enough, despite all the black burn marks on the mainboard, rest of the server seemed to work just okay.

Another identical (hardware-wise) cold spare was already in the rack right below the unlucky one, but it wouldn't accept the transplant license dongle because of service tag mismatch. First I had to install Windows 95 just to run the service tag changer tool and flash the firmware on the spare controller to match the original before it recognized the old disks as an existing array.

In around one week we were back up and running (this was a non-workplace environment so there were no concerned execs bugging us for status updates every fifteen minutes). Had we been using mdraid, we could just have inserted the disks in just about any commodity PC hardware. In hindsight, just restoring the week-old backups would have been easier.

Lesson learned: even if you are using hardware RAID and have an ostensibly identical hardware spare available, it won't necessarily save you.

Post reply on HN