Live data from Hacker News

I lost my data trying to back it up

hamy.io

81–90 of 126 posts

Re: I lost my data trying to back it up

#81

You should always favor mdadm (software raid) over fake RAID solutions. Sometimes it's better to use this even over real RAID cards (which are proprietary) because you don't have to find an exact clone of the card if it fails; mdadm is all software. The only time it would be appropriate to use a real RAID card is when the performance gain is an absolutely necessary requirement, or if you need to expose a logical devi…

I once had a particularly bad time where the 3ware RAID card had a bad interaction with the controller on our hard drives, preventing a rebuild after a disk failure. Thank goodness I had marked that system as best-effort, no-guarantees when asked for cheap local mass storage. This wasn’t even fake motherboard RAID - but it was a screwdriver DIY box.

Mdadm is far more resilient, and I would never go with hardware RAID again without full vendor support.

Re: I lost my data trying to back it up

#83
post #44

Earlier quoted context omitted.

Depends on the use-case really. I use raid (if any) for performance reasons, so I prefer hardware raid with a nice controller and some lots of spindles where flash is not an option. I would never implement this with a software raid solution for reasons.

Likewise. If it’s not offline, verified and off-site, it’s not a backup. Raid is useful for availability as well as performance though. Also while we’re discussing raid, the price/gb of a mirrored set of larger disks vs a raid 5/6/10 of smaller disks (for the same total capacity) is always worth checking - usually comes out in favour of mirrored pair in my experience which also has better performance (especially when…

> Raid is useful for availability as well as performance though.

Also for data integrity, with something like ZFS.

Re: I lost my data trying to back it up

#84
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…

If you tar up backups, it is useful to change the permissions on the archive to read-only. It will prevent accidents like this.

Re: I lost my data trying to back it up

#85
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…

It is very important to elaborate that a snapshot is not a backup of anything.

If you snapshot a backup to provide a history of backups, then the resulting snapshot is also a backup (albeit not a new one, merely part of the original). However, if what you snapshot is not a backup, then neither is the snapshot.

As a good rule of thumb: If you lose data when the machine suddenly bursts into flames in the most literal sense, then that machine cannot even in the slightest be considered a backup. Not even for home use. While the thought of spontaneous combustion seems drastic, total death situations are very real and not rare at all. Lightning, power surge, power supply failure, drive controller failure, simultaneous disk failure, filesystem bugs, and the list goes.

A good backup for things that truly matter is also resistant to the entire building being lost in the flames. For ZFS, the obvious choice would be to `zfs send` to replicate to a machine in a remote location location, but beware of the incremental send hole birth issues.

If you do not use ZFS, or do not have multiple ZFS machines for replication, look at restic (https://restic.net/) and rclone (https://rclone.org/). Restic can through rclone do nice, incremental (snapshot based), deduplicated and encrypted backup to anything from google drive to your toaster. For small payloads (<5TB), consumer cloud solutions such as OneDrive ends up being quite affordable.

Re: I lost my data trying to back it up

#86
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…

Is it safe to backup a database by just straight copying its files? Wouldn't it be better to use a specific backup tool, e.g. pg_dump for Postgres or mongodump for Mongo? (Hopefully you've tested recovery procedures, because as the saying goes, "your backups are only as good as your last restore")

Yes, if the files cannot mutate while it is being done.

Shut down the DB, or use a CoW filesystem which can do atomic snapshots (zfs, btrfs, bcachefs, apfs, ...)

Re: I lost my data trying to back it up

#87

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] htt…

Acronis: I use (monthly) Acronis to drop a .tib file to an external hard disk Z: (license came free with an external drive) Carbonite: I use carbonite to backup all my C: drive stuff (documents, desktop, favorites, portables) and my Z: drive that has the trove of photos, videos, archives, audiobooks, tools, setups, etc. PLUS the Acronis .tib file that contains the full drive clone.

Carbonite backups up 24/7 so I have even the latest changes. The only painful thing would be to find a new/similar laptop to restore my data.

If it would be a different brand laptop, then I would have to go through the pain to setup most stuff. Chances are that restoring to a new laptop may work right off the bat, even if I will have to spend X hours finding appropriate drivers (better than setting up everything from scratch).

Re: I lost my data trying to back it up

#88
post #37
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…

ZFS is great, but it has it's own quirks sometimes. I had an extremely hard time getting rid of a broken zpool a while ago.

ZFS has no room for configuration errors. A common critical mistake that required making a new pool was to add a non-redundant vdev to a redundant pool, as vdevs could not be removed from pools, permanently rendering this pool non-redundant due to its weakest link.

IIRC, the ability to remove a vdev has just recently been added as a feature for ZFS-on-Linux on master, but I do not believe it is released yet.

Re: I lost my data trying to back it up

#89

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] htt…

For macOS, Time Machine can do automatic backups to a mounted NAS volume over WiFi. So my Macbook backs up to a ZFS 3-way mirror. Important files are also stored in DropBox. That's how I get relatively hassle free 3-2-1 backups. For Windows, a similar strategy is possible, but I consider my Windows box disposable (only gaming), so don't have much recent experience.

Just a risk I see here, you have everything IN your home.. laptop, backup.

Unless your NAS is somewhere (not your home's internal wifi network but a WLAN). Consider a Carbonite (or similar) that has infinite backup space to make sure you have the 'offsite' covered.

Re: I lost my data trying to back it up

#90
post #53
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…

If the article writer didn't have 2 copies of his data, he didn't have a backup. I keep a running linux server that all my desktops, phones, and other devices back up to, it's a sort of home NAS. I have a 2nd internal drive that gets mounted and all the important photes and less personal stuff gets rsynced to it. My main drive is XFS, but the backup drive is btrfs. I use btrfs to maintain snapshots and unmount the dr…

I had several copies of my digital archive going back to 1996, including all of the art and music I made as a kid, as well as the first programs I wrote. A few weeks ago I reformatted one of my backup drives so I could use it with my roku TV to watch The Crimes of Grindlewald. Shortly after formatting the disk I realized that I had been mistaken and it was actually the only copy. The worst part is, the movie wasn't even that good.
Post reply on HN