Hacker News

Top stories

Live mirror
30 storiesupdated just nowView source snapshot
  1. Astra for Law(openai.com ↗)
    250comments
  2. Bonsai 2 27B: Near-Lossless Compression in a 9x Smaller Footprint(prismml.com ↗)
    36comments
  3. Bend – A language that blocks AI mistakes via proof, on CPU and GPU(bend-lang.com ↗)
    115comments
  4. Hister: A private search engine for the pages you visit and the files you keep(github.com/asciimoo ↗)
    123comments
  5. Sex, AI, and the Apocalypse(iankduncan.com ↗)
    50comments
  6. Wax motor(wikipedia.org ↗)
    39comments
  7. How to Write with an LLM(sockpuppet.org ↗)
    17comments
  8. Fujitsu launches made-in-Japan next-generation CPU FUJITSU-MONAKA(global.fujitsu ↗)
    180comments
  9. Flet 1.0 – Build cross-platform apps in Python(flet.dev ↗)
    8comments
  10. CrowdSec Source Code Leak(crowdsec.net ↗)
    35comments
  11. Diplodocus, Long Thought Exclusively American, Turns Up in Spain(sci.news ↗)
    7comments
  12. More than 100k people in Japan are now aged 100 or older(bbc.com ↗)
    5comments
  13. The most important product decision is what you don't build(liamnugent.me ↗)
    7comments
  14. Infinite-Parameter LLMs: Generating and Adapting Weights from Live Data(arxiv.org ↗)
    26comments
  15. Rate limits on GitLab.com are changing(about.gitlab.com ↗)
    103comments
  16. How Uber Protects Against Retry Storms(uber.com ↗)
    9comments
  17. How GLM built its own inference infrastructure(z.ai ↗)
    258comments
  18. Why I didn’t sign the Fields medallists’ letter(gowers.wordpress.com ↗)
    248comments
  19. Zettascale (YC S24) Is Hiring ASIC/FPGA Engineers to Build Chips for ASI(zscc.ai ↗)
    discuss
  20. TSMC revealing details about next gen A14 node(mapyourshow.com ↗)
    29comments
  21. The American Religion of Self-Storage Facilities(newyorker.com ↗)
    302comments
  22. How do we prevent mathemathics from devolving into the Medieval Era of secrecy?(mathoverflow.net ↗)
    40comments
  23. One year of sponsored Servo development(servo.org ↗)
    138comments
  24. CCC invites all model citizens to 40C3(ccc.de ↗)
    176comments
  25. Running Ubuntu on the Lenovo IdeaPad Duet(vhaudiquet.fr ↗)
    20comments
  26. Canto: A speech model built for the real world(wisprflow.ai ↗)
    12comments
  27. Computer Reset, Dallas(dfarq.homeip.net ↗)
    discuss
  28. André Weil and the Hodge Conjecture(jiahao116.github.io ↗)
    8comments
  29. Show HN: Snapdrop: Instantly share files between devices. No setup, no signup(snapdrop.me ↗)
    9comments
  30. Launch HN: Skillsync (YC W26) – AI chat sessions made portable across agents
    44comments

Backups Aren't Simple

343 pointsby 1d agofilipovski.net
211 comments
1d agoHN ↗

"Obviously, none of this is worth anything if you don’t actually test restores."

One of my teachers claimed that contrary to common behavior, no one actually valued backups; it was restores that were worth paying for.

1d agoHN ↗

It is a special sensation when you go to your hand rolled backup "solution" to make some simple recoveries and start finding problems. It is a complex mix of not dread but disgust, sick to your stomach, self-anger, and loss. I can only image what that's like with like all of your children's baby pictures being the lost material. Borg and restic are fantastic, it still seems like some sort of dummy proof mode might be desirable, all the features in the world and they have some some reasonably sane policy or something that includes verifications.

On the flip side of that though, really and truly, I've restored a laptop from a timemachine backup and it came back damn nearly identical and that was magical.

23h agoHN ↗

Borg ... fantastic

I needed to temporarily move off 20TB from my NAS and bought a Hetzner storage box.

I wanted to encrypt the data before sending it so i went with the borg ssh mount. Long story short, borg failed a couple of times due to https://github.com/borgbackup/borg/issues/7672, i resumed it per documentation and got 2gb of silently corrupted data. There was no way to do data integrity checks due to broken pipes and there was no option to resume the job from the previous point either. I couldn't afford to go with the s3, backblaze wasn't an option due to placing trust into their proprietary client doing the encryption and i got majorly screwed in the end.

16h agoHN ↗

That issue happens when the repo is corrupted? That's not the cause of the failure then.

Also you must have been unaware of Backblaze B2? It doesn't have a proprietary client, and it launched 11 years ago only a couple months after attic was forked to create borg.

1d agoHN ↗

Try running a business on that basis - where do the restores come from? 8)

We charge our customers for backup storage by volume and that includes an annual demonstration of recovery. We fire up some or all of their systems on our gear in isolation and show that they are reasonably functional.

Your teacher's comment is riffing on the well trod lines of: "heights don't kill people, it's depths that kill people", which is all about perspective. This is is not related to "guns don't kill people ..." which is about agency.

23h agoHN ↗

"It's not the fall that kills you, it's the sudden stop at the end."

23h agoHN ↗

Running a business on that basis would look like the white(ish)-hat version of ransomware. "Oh, your data is gone? How much is it really worth to you?"

23h agoHN ↗

It is true that very few people proactively care about backups. It’s like flossing. People know they’re supposed to do it, but in the moment it feels like a waste of time and energy, when there are more important things to do.

When data is lost, or decay takes over, the value can skyrocket. Depending on what is lost, someone may be willing to pay 100x when they would have spent on backup in order to get their data back, this is why data recovery services can basically charge whatever they want.

My assumption is the Venn diagram between people who pass the marshmallow test, and those who proactively backup their systems, has a lot of overlap.

1d agoHN ↗

So is apparently making readable site.

Software like https://restic.net/ does a good job. Few choices of backend

Accepts stuff from pipe too so you can just pipe mysqldump or pg_dumpall without intermediate files

Very decent options for checking repo integrity, personally (well, at work too, we use it on few hundred user machines and servers) I also added "roll a dice for backup and try to restore it" test script to make sure it is working

Decent deduplication too so "store year's worth of weekly snapshot" is very sensible strategy once you exclude the "constantly changing and useless" (caches etc.) files out of it

can mount FUSE directory with all backups on sensible OSes.

https://kopia.io/ does the same +GUI but a bit worse on CLI front (it insists on keeping local config which makes scripting a bit more involved, but not much)

23h agoHN ↗

importantly, does your die have a side that corresponds to a multi-continental cataclysmic natural disaster of magnitude only known unknown to pre-recorded-history

23h agoHN ↗

I'm using Restic & Backrest (https://garethgeorge.github.io/backrest/) everywhere I can, they're both exceptional OSS.

IMHO, the easiest way to perform a restore test is to use your production backups to refresh a lesser environment on a weekly cadence. Naturally this has to be appropriate to the type of data you're restoring, e.g., our E2E (end to end) testing environment has been built to the same risk tolerances of production so it's suitable for production data and the PII (Personally Identifiable Information) it hosts. If this isn't in your own risk tolerances, you can still perform the same test but ensure the data from prod is anonymised or alternatively destroyed, and perform a second restore after production restore with the dataset that preceeded it that has no PII data or similar.

With this the E2E tests confirm the backups are expected and you can tick a box that when shit does eventually hit the fan, data corruption isn't a problem. Normal caveats apply, you must make sure your backups are immutable so they cannot be modified or changed _after_ the tests have been ran.

17h agoHN ↗

I was using Restic + Backrest as well for my personal Windows machines and it was great. Then I found out that Backrest stores the vault password (among other things) in a simple plaintext file on your local hard drive. Not sure if this applies to all platforms but for Windows users that is a huge security hole in today's environment.

https://github.com/garethgeorge/backrest/issues/1047

10h agoHN ↗

We actually do use some of our backups in anonymize -> test environment pipeline so it gets dual use on top of just testing restores.

We also use S3 versioning in case something gets the keys and just erases it. Then it's replicated to the cloud S3-compatible store to get the offsite location.

Only feature I really miss is "turn this restore into .tar", both for testing restores and for convenience when we get requests of "we need this directory from 4 weeks ago"

9h agoHN ↗

To help others disambiguate choices a bit:

Kopia does not let you pipe into it without intermediate files, or at least not in a friendly way I could figure out.

Kopia seems quite designed around the backup server being the place where the config is set. IMO it's harder to configure if you have your own declarative config tooling (like Ansible, NixOS, etc)

The nicest way I found to ignore files declaratively is to configure a ignore-file pattern in the repository policy and then declaratively create `.kopiaignore` files.

The Kopia server is convenient if you have a server at home and want to back up laptops to it, with them being in a shared deduplicated repository without having to trust the clients not to get pwned and wipe out the backups. However I'm not aware of a nice way to then transfer those backups to aggregate them into a bigger repository. (So I just rsync them off-site and don't worry about getting deduplication with other backups) Also learnt the hard way that you can't set a bandwidth limit when backing up to the kopia server, which can tank wifi performance on laptops during the backup.

I am thinking of switching to Restic as it seems like it is more suitable for people who want a tool at the complexity level of tar/git CLI with declarative config, rather than something imperatively configured.

1d agoHN ↗

"encrypted, chunk-level deduplicated, GFS-rotated, point-in-time archived, cloud, 3-2-1 backup solution" is now my newest password, no commas. (Don't tell anyone!)

1d agoHN ↗

Change the o in rotated to a 0 and you might have a secure password.

14h agoHN ↗

Person entering coffee shop:

"So what is the WiFI password here?"

"You sure would to like to know that eh you effing hipster"

"Does that start with a capital Y?"

"Yes. No spaces."

23h agoHN ↗

I don't want backups. I want synced duplicated data in geographically separated by shared credentials.

23h agoHN ↗

I don't want backups. I want synced duplicated data in geographically separated by shared credentials.

If you accidentally delete something, how long does it take for the delete to propagate to all of your geographically separated datacenters? You need some sort of point-in-time snapshots to be able to recover from accidents and silent corruption.

7h agoHN ↗

Dropbox is quite good like that - you can get back deleted or changed stuff up to 30 days old.

23h agoHN ↗

Sounds like you are the second type of people mentioned in the article.

22h agoHN ↗

that's not really the same thing, what you are describing is redundancy so failure in one (or more) place doesn't bring the system down. Backups are about preventing data loss. Data loss can happen in many different ways, not just a system crashing and burning. It can be deliberately/accidently done such that it would be sync'd everywhere.

23h agoHN ↗

Motivated by our success in developing this solution, we try to use it to backup the homelab with its 10 Docker containers. But later we find out from logs on the individual machines that backups are failing. The reason being that many Docker containers like to create root-owned files, and if you’re not careful you can create a cronjob running as the default user.

and a privesc also.

22h agoHN ↗

Yeah it feels it can be risky to "make the backup also dump the databases, and give it full filesystem permissions on our Docker volumes", depending on what binaries get the root privileges.

What I do is having a minimal systemd timer under root that only calls restic for backing up files (with some additional systemd seucurity restrictions). App-dependent backup logics, like dumping databases, are done by user/container-level cronjobs separately.

15h agoHN ↗

The ideal setup is rootless Podman and having all your containers not even be able to create root-owned files.

It would also be great if services did their own database dumps. Immich does this and it's such a relief to just be able to copy over its volume for backup purposes.

Unfortunately we don't live in an ideal world and so much of the software both doesn't dump it's own databases, and is incapable of running in a rootless container.

If you weigh the probability of a privesc from your backup with full access to the volumes, against the probability that the software you run has a CVE, which one is worse?

This is one of those things I consciously chose to ignore in my setup. Maybe it will come back to bite me in the future, sure. Or maybe I will learn a better approach that pushes my frontier of convenience-security forward.

23h agoHN ↗

One of our customers decided to go for off site backups with us - they had been a customer for 15 odd years for other services. Backups are not our core business, its one of the services and I got around to setting them up sooner rather than later.

Two weeks later they had a fire in one of their huge printing machines which caused quite a lot of direct damage due to heat and rendered a lot of equipment broken due to smoke/fumes. It was also, as it turns out, a week before the first COVID 19 lockdown in the UK.

Their backups landed on a XFS file system with reflinks enabled. I cloned their repo and fired up NFS with their VMs running on our gear. It took me another hour to spin up another OpenVPN server (CA etc) for them to use and sort out a few other details (coffee doesn't brew itself).

They ran via VPN out of our data centre for most of the pandemic.

That was an utter triumph but I also have some rather less triumphant stories about backups and lack thereof. Let's skip over those 8)

23h agoHN ↗

There are four times in my life I have suffered regrettable data loss incidents.

The first was when the telephone pole outside our house was struck directly by lightning. Not only was it the loudest thing I have ever heard, the current surged through the telephone line, into the internal fax modem, and fries everything within its vicinity. I was 10. I did have backuos, but only only floppy and they didn't cover everything.

The second was storing data in OneDrive - a change to their terms surrounding "lifetime" unlikely noted storage, combined with a client that was unusably slow to download and a deadline for data retrieval meant that I lost most of my files.

The third was SD card failure in digital camera on holiday, the controller chip died catastrophically, leaving the card completely unrecognised. It was a brand new Sony 128GB card, manufactured by Toshiba, and it seemed to be a common issue. I now shoot to two cards simultaneously.

And the fourth time was ... Performing a backup. An errant script deleted the source content, but I'd also deleted the existing backup to free up space for the new backup. I've been weary of using rewritable media for some time now as a consequence, but I think backups themselves are high risk activities.

22h agoHN ↗

I now shoot 2 cards simultaneously

A very lovely change over the last 8 years or so lol. I came up in film during the DSLR revolution. 5D2’s/7D’s/Rebels (i series) years.

8bit 420 nasty aliasing recording on single cards and praying baby. Magic lantern booted on those same SD’s!

22h agoHN ↗

Mainstream DSLRs with dual card slots came out 22 years ago.

21h agoHN ↗

Sadly after 22 years, it's still considered a "high-end" feature. Even on $1600 Fujifilm x100vi, there is still single SD slot.

19h agoHN ↗

I also have the same fuji. Digital cameras are still in the stone ages. I think Tony Northrup covered it well. Nothing has changed since digital cameras came to market, the workflow is still the same, copy files from a card to PC. They aren't connected to the internet, they don't have automatic syncing to cloud for backups or sharing, fuji doesn't even have a gps chip built in to store the location (only works if connected to a smartphone), they can't be locked via fingerprint scanner. It's all tech from 25 years ago.

19h agoHN ↗

In some senses it's good. That feature list just says "use a smartphone then". No thank you. It's everything that a camera should not be.

GPS is useful, but not wifi. I don't need my camera becoming another IOT always online telemetry device. They're one of the few electronic devices built to last. Imagine needing fingerprint unlock on a camera, and for what? Prevent others from viewing your photos? Changing your settings? Also copy from card to pc is the best possible workflow. Imagine cameras like smartphone with no expandable storage.

Stop giving these people ideas! I am now very afraid they will listen to this guy since he actually has a follower base.

16h agoHN ↗

Also copy from card to pc is the best possible workflow

So turn off the camera, open the memory card slot cover which is flimsy 1mm prong, eject the card, insert it in the reader (if you have SD reader) or fiddle the microSD first from the convertor and then insert, copy, (insert microSD to SD convertor), open up slot cover, insert the card.

Surely beats just connecting the camera to the WiFi (which it does have anyway) and downloading through SMB. Suuure.

S9900 from 15 years ago had a built-in GPS receiver (and absolutely unneeded and never updated POI system). P1100 needs a smartphone for GPS for whatever reason - and app doesn't work 5 times from 5. But the latter is on me, I knew what I would get when I bought Nikon.

15h agoHN ↗

why do you assume a functionality will obligatory be abused against the client?

pro camera manufacturers are not google or apple. Have we became that defeatist?

18h agoHN ↗

Windows OS is also stone age. There is no simple way to list all user data, or user edited system data for simple backup in readable format.

Btw X100F has Wi-Fi and automated file transfer to PC. But it is faster to transfer it via SD card.

15h agoHN ↗

Cameras had gps for a moment but they all dropped it because it sucks. GPS takes a long time to get a fix so unless you want to turn the camera on and sit for 5 minutes before taking the photo, it doesn’t work. Meanwhile an app on your phone can ping the current location to the camera for free. Your phone always has a location lock and it’s super power efficient at getting it.

And the rest of it is essentially features for a market that doesn’t exist. People buying cameras today don’t want to send straight to Facebook. They want to sort through raws, edit in Lightroom and then post from a laptop. The market for the features you want all moves to phones long ago.

Sony also has a bunch of the features you are asking for. It can connect to the internet and live sync files to an ftp server. It can even upload proxy videos so your editors can start work before you get back to copy the master copy over. Cameras are sold to prosumers and actual professionals now so the featureset reflects it.

14h agoHN ↗

People buying cameras today don’t want to send straight to Facebook.

Pretty sure that's the main point of Fuji camera, the output and built it filter is decent enough that you can upload to Social network without any editing.

12h agoHN ↗

In case this eases your pain, there exists SD cards with integrated WiFi for ease of data transfer.

9h agoHN ↗

I actually prefer this workflow, although GPS would be a nice addition.

21h agoHN ↗

I would hope they have some feature for automatic backup to your phone over bluetooth or such today.

21h agoHN ↗

WiFi is a little faster I guess? In the primitive days people used the EyeFi.

19h agoHN ↗

You would often not have wifi available, and you wouldn't want to have to type in wifi passwords to your camera all the time. But your phone will almost always be nearby and persistent bluetooth is easy.

19h agoHN ↗

Wifi between your camera and the phone. Or your camera and a laptop in your bag or whatever...

15h agoHN ↗

Problem is they have to disconnect from the current wifi ap to connect to the cameras ap which is inconvenient and means there can’t be a constant connection.

Wifi NAN could be used to solve this problem but I’ve not seen anything using it. Apple only just added support last year though.

19h agoHN ↗

My Nikon ZF transfers to my phone through Nikon's SnapBridge app automatically.

19h agoHN ↗

Oh, that's cool, kudos to Nikon, could be a good reason to switch over from Fuji.

16h agoHN ↗

Bluetooth is slow. The transport is 3Mbps at max, if you subtract all the headers from different layers, you may have like 1.5-2Mbps practical transfer speed.

16h agoHN ↗

Sounds like the "or such" wins, but even with bluetooth speeds that means you're backing up 1-5 photos per minute and that helps a lot.

14h agoHN ↗

And harm a lot too, you phone can't deep sleep since it has to wake up periodically to process data from bluetooth stack. Combined with slow transfer speed, that gonna eat your battery like nothing.

21m agoHN ↗

None of Canon’s 50D and up line, 7D line, 5D line, and rebel line did anywhere near that long ago. So if you want to exclude all of those cameras from “mainstream DSLR’s” I guess so? I did not shoot on Nikons back then but I imagine most of their fleet didn’t have dual slot recording either. You’d have to get high end pro gear until 10-12 years ago for it.

The 5D3 was first, so that was like 12 or 13 years ago now. It rolled out after that over a few years across their fleet.

16h agoHN ↗

Magic Lantern was awesome. I still have raw video sequences I shot on a 5D mkiii

21m agoHN ↗

Can you even get the software to process it anymore? That was such an exciting time

22h agoHN ↗

a change to their terms surrounding "lifetime" unlikely noted storage

I had a similar experience with a Chinese cloud storage provider. They didn't even give a convenient way to export the data. And the client throttled download to like 100KB/s. I luckily was able to parallel download by running the client on several VMs...

An errant script deleted the source content, but I'd also deleted the existing backup to free up space for the new backup.

Sounds like the backup workflow is fundamentally flawed... But I also have the fear that the backup program with root privileges can go off the rails... So I keep my backup job as simple as just running restic with some systemd restrictions.

21h agoHN ↗

I've been weary of using rewritable media for some time now as a consequence

I briefly considered using bluray disks as a backup for my photos and other critical docs. But getting a decent bluray burner seems not so easy these days with most production winding down. Next best thing looks like the "object lock" feature on object store services that prevents deleting objects for a certain time.

21h agoHN ↗

I pretty much instantly wrote off physical media because I know I won't reliably move it to a separate location. If I'm going to have backups, I want ones that are not within fire/flood range of my computer.

In terms of preventing "oops" moments, I'm mainly relying on software (restic) for that, where I trust that (A) backups always append data rather than replacing and (B) it's logic works for marking which data to purge based on rules is accurate. [0]

[0] https://restic.readthedocs.io/en/stable/060_forget.html#remo...

15h agoHN ↗

You want to make sure the append only is enforced by the hosting provider rather than duplicity. Your backups should be resistant to having an attacker on the system who can run arbitrary commands with duplicity.

5h agoHN ↗

Right, defense against internal "oops" accidents looks rather different than defense against purposeful sabotage.

While the local backup service uses an API-key with limited privileges, I need to go back to the bucket/storage-zone settings and see what I can enable, how it would affect total storage, and whether I (with additional privileges) can reliably grab the correct mix of old-blobs to do a restore.

21h agoHN ↗

I bought a tape library for my backups, but that's probably an overkill.

On the other hand, LTO-5 drives are now pretty affordable. And each tape cartridge holds around 2Tb of data for about $20.

20h agoHN ↗

Wait really ? That's a huge change from last time I looked. How much did this setup cost you?

19h agoHN ↗

I kinda overdid it with a tape library (40 tapes capacity, LTO-9), but I'm using it for my company's AI model backups. _That_ setup was about $12k.

I had a smaller setup before, with a simple external LTO-5 drive. Used drives are now are about $300, and you can probably find them cheaper. And LTO-5 is the minimum realistic version, it's the first one that supports LTFS and it has reasonable tape capacity.

20h agoHN ↗

Next best thing looks like the "object lock" feature on object store services that prevents deleting objects for a certain time.

Lol, no. "As of today we are closed. Goodbye."

Especially considering what giving even a two weeks now considered "generous".

16h agoHN ↗

This is for backups. The threat here is that random ware uses your backup script to delete/encrypt the backups too. With object lock the api key the script has can only add data.

The probability that the object store goes out of business at the exact time your own copy dies is insignificant.

16h agoHN ↗

No object lock API would help you if the business where you rent the service is going out of... business. With all your data - and you are without.

Or even fancier - just changing the price for the egress.

15h agoHN ↗

That only matters if it happens literally at the same time as a failure of your primary storage. If they increase the price you can just close your account and move the backup to another service.

The probability of a hard drive failure or ransomware at the same time as backblaze or aws going out of business is pretty much not worth thinking about.

The probability of an attacker using the api key in your backup script to destroy the backups is far more possible.

19h agoHN ↗

For digital media we really need a good stable archival storage solution. Nothing on the market right now for ordinary people.

18h agoHN ↗

There's plenty of backup services and cloud solutions. The article mentions Borg and Restic, others like Backblaze are more consumer friendly. Which needs do you have that aren't met by any of these tools?

15h agoHN ↗

Online only is fine as an actual backup, presuming you have the primary in your control.

It shouldn’t be the only copy of the data that exists.

11h agoHN ↗

PBS's situation is entirely PBS fault. If you've got 50TB of data to backup it's either worth $300 to $400 a month to you to do it properly with a reputable vendor along with on-site storage, or ... just accept you'll lose it.

It was such a tremendously silly decision I almost wonder if it wasn't a politically motivated decision. Maybe the provider that went under had some relative DEI points versus Backblaze or AWS. Just bizarre.

But I wouldn't extrapolate anything out from their situation.

11h agoHN ↗

Backups are not archival storage. If you stop paying for service, say goodbye to your data.

19h agoHN ↗

OneDrive...

So much fail in one single product.

18h agoHN ↗

It is made by Microsoft, the experts in this domain.

12h agoHN ↗

Man i absolutely hate how windows insists that my various personal folders need to be OneDrive and then complains that there's not enough space. I've tried to just disable/remove onedrive but if it's possible it's certainly not easy. I'm pretty sure there's a bunch of stuff I've lost due to the same thing the other guy described, limit was reduced and files just deleted.

Either give me unlimited space or get out of my file system. They could have just made it a separate thing and let me put stuff in there if I wanted to, instead of hijacking my file system and just messing it up.

11h agoHN ↗

I have the paid OD, and think I know what I'm doing, and still got burned on occasions, luckily with little consequence due to other mechanisms in place. But when I really didn't want to deal with OD's crap, I went all nuclear on it. Uninstall. When MS insisted to reinstall it, I replaced the executable and went for file system permissions. I twisted them so hard that even MS couldn't (or at least didn't try to) overwrite my fake OD executable.

I stopped running Windows wherever I can not because the tools or OS are that bad but because a machine should come with sane defaults but should respect my wishes if I want to go against those defaults. When it starts to override me, it's not my machine anymore and whoever "owns" it (MS in this case) can shove it.

18h agoHN ↗

Since we’re talking about it: anyone backing up their iCloud photos? If so, how?

18h agoHN ↗

I have a weird setup lol. I use a shared photos library with my partner (so that we have all family photos together) and have a MacBook Air that has Photos being download in raw quality and backups then via Time Machine on a Synology NAS. Plus, Synology photo sync on my iPhone (backing up on my NAS separately from Time Machine) AND Google Photos on my partner’s (syncing on Google Photos). Yes it’s horrible, just never had time to clean I up properly but I prefer to have them in multiple cloud locations and locally for now than optimise for having a clean setup.

17h agoHN ↗

From iPhone into local machine through LocalSend or AirDrop, then your usual favorite backup pipeline.

11h agoHN ↗

That's tedious. Can't believe nobody mentioned Parachute Backup yet. It had a moment in the sun earlier this year or last year when it first started getting traction.

I have a Mac, so not just an iPhone, so I use Arq there, it materializes the iCloud stuff as necessary for backup. But if all you have is an iPhone or iPad along with an external disk, NAS or whatever, Parachute Backup will do backups to a variety of destinations.

16h agoHN ↗

When I was using Ubuntu, I would plug my phone into my laptop and run this small script: https://gist.github.com/wheelercj/8cce112fc8ee55fd4858847a52...

It's mainly just rsync. When the phone was plugged in, the photos were accessible at a path like "/run/user/1000/gvfs/gphoto2:host=Apple_Inc._iPhone_abc123/".

Now I use Time Machine, but I still need to check whether it includes iCloud photos.

16h agoHN ↗

Does this include all the image metadata and who knows what else?

14h agoHN ↗

While I haven't tested for that myself, the script should keep pretty much everything including image metadata. I just made a small change so that it also keeps extended attributes in case any image-related metadata is there.

The script currently requires changing one or two folder paths at the top (more details in the script).

16h agoHN ↗

It's not iCloud Photos, in my case it's Google Photos. But I keep a copy of all my photos in a self-hosted instance of Immich [1], which I then back up to a Hetzner Storage Box using Backrest [2].

So I end up with 3 copies of all my photos, on 3 different providers (I mean... 2 different providers plus my homelab disk).

[1] https://immich.app/ [2] https://github.com/garethgeorge/backrest

13h agoHN ↗

Amazing question with nobody really answering your question 100%.

The answer is : it's hard. If you only have a iphone and more photos on your icloud than can fit on your phone, you're kinda screwed if you don't know what you're doing.

AFAIK Apple makes it very difficult to get all your icloud photos bulk downloaded, original quality off icloud.

Google is no better.

It's much easier to start backing up from the beginning but once you're stuck on icloud it's hard.

10h agoHN ↗

Not a very good answer.

If you have a Mac with sufficient storage, you can just enable iCloud to store photos locally, then export them. That could miss some data (I think descriptions you set for a photo were not exported the last time I checked), but it is most of the data.

1h agoHN ↗

Do you need to export them? Can you not copy the library file to a different drive?

8h agoHN ↗

I seem to remember being able to select all of the photos in iCloud in a browser and clicking download. It zips them and it worked.

I would imagine this doesn't work well after a certain amount of data. I’m also not sure they were the originals.

7h agoHN ↗

Yup. Only reason I'm on OneDrive is that they don't mess with photos and their metadata. For now, at least.

I guess it's because the core offering is still some version of "a folder that syncs", and the photo gallery is just a view bolted on top.

I steer clear of any solutions scoped to photos only, as it always turns out they either screw you up by reducing quality and throwing away the originals, or trying to lock you in by only offering metadata they keep in a database they will not let you export.

7h agoHN ↗

From iPhone to the family's Immich instance on a RAID array and from there to Backblaze

17h agoHN ↗

I did have backuos, but only only floppy and they didn't cover everything.

This made me remember the time during the 90s when I lost all my BASIC programs due to a hard disk crash, and seeing me sitting sad, my mother handed me a bunch of floppies and asked me to see if they contain something useful.

And turned out that it had all the programs! I took the backups and forgot about that. Apparently that is one of the hard things with backups. You need to track them...

16h agoHN ↗

I would say you didn't get quite the right lesson from the fourth one. Rewritable devices are fine, but have (at least) one backup completely unplugged while you update another backup.

22h agoHN ↗

I’m setting up 3-2-1-ish backups for my infra of 3 hosts, and definitely leaning towards Restic + Backrest.

All my hosts run the same CoreOS setup (https://github.com/ebrahim37/infra-template), where container volumes are placed in one central volumes/ folder and that is the only thing I have to backup.

I plan to implement it like this:

  vps1:
  - restic container with custom sh entrypoint that will backup volumes/ to homelab every 24 hours
  homelab:
  - backrest container, to back up volumes/, do prune/check, replicate repo to offsite
  - rest-server container, will store backups from vps1, homelab, offsite
  offsite:
  - restic container, backs up volumes/ to homelab every 24 hours
  - rest-server container, store copy of backups from homelab

Only caveat is backing up databases, will either have to do: stop container, backup volume/database-data, start container; or use pg dump etc.

The deduplication is nice, you can have a snapshot for each week of the past year without crazy storage cost

15h agoHN ↗

I've been trying to find a solution for this too! I was considering using Rclone but too many things are using SQLite for me to trust rsync. I was also going to go with CoreOS but I'm leaning towards Fedora Cloud now in case I need to manage things a bit more (and "auto updating" is not something I want as that suggests auto rebooting).

Your secrets.yaml makes me nervous though - too easy to miss a key and leave something exposed. Why not just add the whole file to the vault?

8h agoHN ↗

I like CoreOS because of the fact that all config, etc files, sysctls are in one place.

Previously, I was using artix and had this “etc” directory[1] checked in to keep track of system configuration, but there was no good way to keep track of config drift (other than remembering to update this dir).

Haven’t gone through a CoreOS update yet (been using for ~2 months), but doubtful it would break anything. I’ve tested to make sure all my containers shutdown gracefully etc.

The SOPS (secrets.yaml) pattern is more common in NixOS configs, and I found it works nicely here too. In the artix setup, I had a bunch of .example files strewn around [2], which I had to remember to sync with the real versions.

Encrypting a key is just prefixing it with “enc_priv_”, SOPS will encrypt and decrypt it automatically. I keep “public” values plaintext to maybe help someone setting this up for themselves. Just have to double-check git diff before committing.

[1] https://github.com/ebrahim37/infra-template/tree/00eccff06ae... [2] https://github.com/ebrahim37/infra-template/blob/00eccff06ae...

6h agoHN ↗

Are you aware of sqlite3-rsync ?

It is a tool that was created by the author of sqlite. It does just what you would expected to do.

22h agoHN ↗

A friend of mine used to work at Veritas[0] making enterprise data retention solutions. When I spoke about their product as being "making backups", he corrected me by saying:

  We are not in the backup business.  We are in the restoration
  business.

0 - https://en.wikipedia.org/wiki/Backup_Exec

21h agoHN ↗

Backups are boring. Restores, on the other hand, are often exciting.

19h agoHN ↗

Backups can be automated. Restores are a manual, heightened-attention, deep-focus process.

13h agoHN ↗

If Seinfeld told a backup joke:

"You know how to take the backup, you just don't know how to restore the backup. And that's really the most important part of the backup, the restoring. Anybody can just copy a file!"

1h agoHN ↗

Restores can be Very exciting. I worked tech support and got trained on an email server backup program. I was alone for my first call on the program.

Before I could finish the greeting I knew it was going to be a wild call as I could hear in the background someone shouting and someone sobbing, the guy actually on the phone sounded like he wasn't planning on making it home that night.

Turned out they were testing out some sync software and after a test they deleted the sync without turning off the app which then did its thing and now nobody could log in except admin who was the only user left.

I was able to find and confirm that the backups were in place and accessible. Which was good, I could hear them breathing again. But I had no way to get the restore going because the source server was so hosed.

Just then the dev walking by and I got him on the call and he did some outright hacker magic to get things to the point that a restore could function.

I thought about writing my notes into a troubleshooting guide but then realized it would be better to skip the hacking and make a setup guide that showed them how to set it up properly in the first place.

21h agoHN ↗

Correct. In data protection, backup is not the feature. Restore is the feature.

20h agoHN ↗

https://en.wikipedia.org/wiki/Backup_Exec

No. But, well, yes: if you use BE - you will need a restore pretty soon.

I'm the person who actually experienced BE walking around the file server and deleting files. Helpful suuport person had done the needful and said what this is not an issue and it wouldn't be reported as a bug.

22h agoHN ↗

I'm polishing my backup system right now, and found that `tar | zstd | gpg` plus a small vibe-coded wrapper is pretty much all I need.

GNU tar has its own incremental index via `--listed-incremental=FILE`. Unlike Borg or Restic, which have their own more complicated repository formats, this leaves me with just one additional file (the `.snar`) alongside a dumb, portable full-disk tar archive.

The nice part is that, unlike repositories that require both read/write access patterns, tar can compute deltas using only the small `.snar` file, while the main `full-disk.tar` can remain buried in write-only Glacier storage. This makes it a much better fit for Glacier's write-once model and 180-day minimum retention.

My current plan is to upload a full-disk tar to an external HDD + Glacier on a weekly cadence, and the `.snar`-based deltas daily. That gives me a pretty simple cloud backup solution for a few bucks a month (after burning through $100+ of free credits).

21h agoHN ↗

How well did it work for restoring?

For me, the ability to mount a backup and look at a particular file proved to be important. Also, I restored from my backups four times; two of them was moving between machines, pretty quickly.

21h agoHN ↗

The problem with using glacier for backups is it's hard to run restore exercises, and without restore exercises, a backup is pretty dangerous

21h agoHN ↗

You can exercise it against regular, non-Glacier S3. Same flow; the only difference is that you skip one attribute on upload and one request/wait step on download.

3h agoHN ↗

The most polished Glacier backup/restore mechanism I know -- because I helped build it -- is through rustic <https://rustic.cli.rs/docs/commands/init/cold_storage.html>. It has native support for backing up to Glacier (because writing to Glacier is identical to writing to regular S3), and it supports external "warmup" programs to support cold storage of your choice, with Glacier having an existing warmup program you can use.

21h agoHN ↗

For my Oracle Linux systems, I rely on the vendor ReaR RPM package for the baseline backup. This is similar to the "Ignite" utility that I used in my HP-UX days.

https://relax-and-recover.org/

This is two-fold useful, first as it enables boot from backup media for total recovery, second in that it creates a backup.tar.gz that holds everything that was not explitictly ignored in the /etc/rear/local.conf file.

I'm running Oracle databases on these systems (and the local.conf is configured to ignore the datafile directories). I have standby databases (not Dataguard in that I don't have online redolog replication) that allow me to recover them to the primary in a disaster, with some loss of committed transactions.

I finally have rsync configured for some scratch temporary files.

I have dallied with btrfs snapshot replication for home directories (in a loopback mount). My vendor support (via a CSI number) has been on and off, so I don't use btrfs in areas that we need it most.

My replacements do not like the complexity (and I am retiring).

21h agoHN ↗

Yep, backup is a verb, restore is a noun. Testing restores is where the real work begins.

21h agoHN ↗

On my home PC I use restic, and (shockingly) I run it manually (via a script). I have a terminal banner that nags me when backup hasn't run in 24 hours, or displays spanish verb tables when it has (so I will notice if the banner doesn't show). I've been burned in the past losing a backup cron, and dead man's snitch seemed overkill for my needs here. And I've also forgotten what backup system was in place on a prior install, and it took me way longer than I liked figuring out how it was setup when I needed to do a restore.

Obviously for production systems automation & monitoring is the way. I kind of like this setup on my own machine though.

21h agoHN ↗

As an average-techie person, the only piece of data that i truly practice 3-2-1 is photos and videos. 1 on my phone, 1 on my small server running Immich, and 1 is on Google Photo(sadly, the quality is loss, but i can live with that).

Most of other data i only have 2 backup, usually 1 at my local machine(code) and 1 online(github). Yeah it's not ideal, but another question to ask yourself, is it truly worth it. I trust the engineers at MS doing much better job at backing up their data than me.

19h agoHN ↗

I tried to set up something similar, photos and videos on local NAS + cloud storage. Also with data loss, eg. I don't sync any large RAW camera files to cloud. I clone my local machine with CCC onto an external drive, that way it should be easy to just restore the last state onto a new machine. So I think it's archival storage for media vs snapshots of your working setup so you can restore quickly.

20h agoHN ↗

On the topic of backups, 7zip recently changed its handling of the FILE_ATTRIBUTE_ARCHIVE bit on unzipped files which caused an issue with some old software I was using. This is from the old DOS days with the BACKUP/RESTORE commands - the bit was set if any backup was made of the file. It's comically naive because it only assumes a single backup and this bit was forgotten to the sands of time until it was disturbed by some meddling kids!

19h agoHN ↗

have this happen every morning at 5AM by creating a temporary text file containing this line: 0 5 * * * rsync -vax --delete --ignore-errors / /Volumes/Backup/

This leaves you needlessly exposed to this failure mode: Commit some "braino" that wipes out some recent work. Go to bed without noticing the loss. 5am rsync run wipes your backup as well.

The fix is to back up to not just one but to a rotation of images. Use --link-dest to reduce storage overhead to the size of the directory hierarchy only.

58m agoHN ↗

Clicks on the link…yeah that’s accurate

20h agoHN ↗

So our first principle is to have a backup, i.e. a copy of your files someplace else. So far so good.

So who are we? A household with a localhost administrator?[0]

Then you are surely doesn't need encrypted, chunk-level corporate level bla-bla-bla.

You need a Syncthing copy to some other device not at home - and an additional backup procedure to maintain the history and protect against PEBKAC errors - which can run on your local Syncthing copy or/and the other one.

And no, nobody needs your 555GB of RAWs of sunsets/flowers/precious_family_moments you shot - not even you.[1]

[0] well considering the tone of TFA and most of the comments here

[1] that's Instagram/Google Photos/iCloud for nowadays, totally with "Remember this day N years ago?"

15h agoHN ↗

So who are we? A household with a localhost administrator?

In my case, yes. I've gotten into the trap of building a homelab that over time became pretty important, more like a small prod environment. We take for granted the "stability" that cloud services provide (until the terms of service change and you are screwed over by either loss of privacy, loss of access, etc). Self-hosting these things yourself exposes you to this complexity.

Photos aren't that important, how about your passwords and documents and the whole setup around all this?

I also do a part of this just for the love of the game.

20h agoHN ↗

If you don't control your data size, it will end up controlling you and your backup choices, which will eventually lead to many avoidable, disastrous outcomes. Somehow, this gets missed in data storage and backup planning.

6h agoHN ↗

Agreed - information always expands to fill the available space, and placing a cap on your available space is an underrated strategy

20h agoHN ↗

When it comes to software, it's almost never simple. What people think of as simple is rarely so.

For example:

Requirement:

"Just copy a file from folder A to folder B."

Minimal translation:

"Implement the capability to copy any file, in any format and of any size from SharePoint, located at a configurable path, with appropriate authentication and access control checks, then stream it in chunks to a different, configurable path inside an S3 bucket, also with appropriate authentication and access controls in place. Ensure that any disruption in either service which may occur while the file is streaming can be recovered from at the point it failed instead of having to restart from the beginning. Ensure that the retry mechanism is built-in and that the retry window is configurable; if the file cannot be copied within the specific time window, then an error should be sent via email to a configured email address. Ensure that the entire transfer is encrypted in transit... If the file happens to be a folder, then you must copy across all of its contents recursively up to a certain configured MAX_DEPTH to avoid DoS and ensuring that the system does not get caught in an infinite loop due to symlinks pointing to a parent folder... In this case, send an email to the configured address... Etc... Etc..."

And the thing is; if you tell AI "Just copy a file from folder A to folder B." - It will not meet your 'basic' needs because even if it does a great job at filling the gaps in your requirements, it will still take shortcuts. In order for an AI to avoid taking shortcuts, it would have to make you fill out a questionnaire and make you sign up for and configure services; it would not be a pleasant user experience. The user experience cannot be pleasant, because the AI cannot read your mind and it cannot know your intent.

17h agoHN ↗

Here's a thing: my intent and requirements actually are:

"Just copy a file from folder A to folder B."

All that access control and authentication and symlink nonsense? That's a self-inflicted problem that exists only in enterprise, and shouldn't be assumed - much less created - for regular users.

1h agoHN ↗

This is your intent until I finish implementing and then you complain that it doesn't also work with folders or large files and it doesn't work with any file system. Or you will complain if your colleague accesses your file without your permission.

Reality of software development is that the user would expect every single one of those things but they simply don't understand what they want up front.

There are three different aspects to consider in my experience; what the user says they want, what the user thinks they want and what the user actually wants.

The three can have substantial differences.

19h agoHN ↗

Something is better than nothing. I accidentally spilled liquid on my macbook just the other day. It's still in the shop. Luckily, I periodically clone my drive with CCC onto a single external SSD. Don't wait to set up the perfect backup solution, just have a copy of your data in more than one place, that's a good start imho.

12h agoHN ↗

Yes, rsnapshot is excellent, I'm glad the article mentioned it. I use it for my weekly backups. So wonderfully simple. I wish the config file weren't quite so strict about syntax, but I only need to change it about twice a decade so no big deal.

19h agoHN ↗

concerning backups, when it comes to disaster recovery you need a strategy for restoring as well, sometimes it's not only the data you would need but the systems as well

19h agoHN ↗

I have a cron script that rsync my entire home directory every day with a remote server. Since rsync doesn't remove remote files, I re-create a backup from scratch the first day of each month and store a copy of the previous one.

Using old standardized open source tools means it survives system updates without having to fix anything for years. I got my laptop stolen/lost 3 times over the past 15 years, and I have always been able to restore everything the next day on a new laptop, in the time it takes to transfer the files over the network.

I haven't given much thought, I'm sure there is a realistic scenario where this strategy would fails but I haven't found it yet.

17h agoHN ↗

rsync can delete remote files with --delete or --delete-after

What is missing is recovering accidentally deleted or corrupted data.

8h agoHN ↗

rsync can delete remote files with --delete or --delete-after

Yes but I don't use it precisely because that lets me recover files that I have accidentally deleted. I assume it's the intended default behavior of rsync.

7h agoHN ↗

What if that happens after your monthly creation of a new backup.

5h agoHN ↗

I keep the previous backup for one month and then delete it. So eventually the file is lost yes, but this is inevitable if you assume finite amount of storage.

3h agoHN ↗

In that case I think its a good system. Its very similar to an incremental backup in what it achieves.

18h agoHN ↗

Time Machine (to NAS) + iCloud (w/ ADP) + local copy is the lowest friction path I have found.

5h agoHN ↗

I had an synology NAS power blip which caused a long term time machine to become completely corrupt, like, i’m not confident its quite so compatible with non apple disk formats

18h agoHN ↗

Truenas, Crashplan gives me a 3-2-1 with rolling, incremental backups at a pretty low price

18h agoHN ↗

I really like ZFS snapshots with offsite pull-mode sync using Jim Salter's sanoid/syncoid [1]. ZFS is the base for all OS/filesystems on top of it. If you have a good system for organizing ZFS datasets, and separating ephemeral from persistent data (e.g. [2]), then this is 90% of the backup requirements already fullfilled.

    [1]: https://github.com/jimsalterjrs/sanoid
    [2]: https://du.nkel.dev/blog/2026-05-16_rootless_docker_virtiofs_proxmox/
15h agoHN ↗

I like to use ZFS snapshots of running systems and then create and upload the backup from them via the excellent Borgmatic. (I know you can't depend on snapshots for databases and similar, but it's worked until now™.)

15h agoHN ↗

Thanks for the second link - looks interesting.

I have an old and loud 16-bay server that boots every 7 days or so if no one is home, `syncoid there here`, and shuts off. I'll get pinged by uptimerobot once in a while if it's overdue and I'll get a notification if a pool is unhealthy or reaching capacity (`sanoid --health` I think). Otherwise I forget I even have it set up.

Automated cold backups are great peace-of-mind.

14h agoHN ↗

Exactly! My offsite Backup box boots using a Shelly Plug S set on timer; it doesn't need to unlock the enrypted ZFS datasets because I use zfs sync snapshots in raw mode (-R). After the zfs scrupt, the box sends an email to me and shuts down. Next week: Repeat.

15h agoHN ↗

Using this in production for 5 years now. We have a replicated MongoDB and one replica lives on a ZFS doing snapshot backups via syncoid. Love it.

14h agoHN ↗

And FreeBSD comes with native ZFS. MORE, it snapshots your OS before updates/upgrades, so you never ever screw up any upgrade.

5h agoHN ↗

It's not native ZFS. They threw the native port away and replaced it with ZoL.

18h agoHN ↗

+1 for restic.

ZFS snapshots + restic backups to backblaze for my homeserver. My secret sauce is a healtchecks.io instance that blows up my phone if ZFS scrubs throw any errors, when local snapshots fail, or when restic checks or backups fail.

18h agoHN ↗

My setup: rsync to Synology NAS, snapshotting there, sync to remote Synology NAS over VPN. (The other NAS is at my parent's and they have similar setup syncing to me)

The best part: it is just files, not some proprietary archive. I have high confidence in this. I can restore with the most rudimentary tools.

This setup has worked for me well on linux, windows and now mac. I migrated to new computer&os by restoring the backup mostly.

17h agoHN ↗

I use ZFS and do off site backups using rsync.net.

17h agoHN ↗

They are simple.

The issue is companies love to fire QA people who should be the ones testing these.

Microsoft says we don’t need no SDETs, our products can ship full of issues.

What are the hostages, I mean customers going to do about it?

I have no sympathy for any major corp who suffers data loss. Now individuals who lost grandmas wedding photos, that sucks.

But my recovery strategy for that is simple. After scanning I emailed it out to one cousin who emailed them out to a few more. Plus I have a cloud backup ( I have no idea where the the original files are).

Data is meant to be shared after all

17h agoHN ↗

There are two types of people: those who have suffered a catastrophic loss of data, and those who will.

This is an empirical claim, but is it grounded in reality?

99% of people don't backup, and that's probably the right choice because the risk is low, they can't meaningfully improve their restoration rate themselves and they don't care enough about their data to classify its loss as catastrophic.

When a person hears someone talk about the importance of backups, but also haven't heard friends/family suffer this date, they will rightfully ignore this warning.

Or do we all follow the best practices as it relates to backups, exercise, sleep, nutrition, accounting, house maintenance, ... Etc.

I do not. Backups aren't near the top of that list.

This stuff just isn't very important to most people and that's okay.

16h agoHN ↗

99% of people don't backup

This depends on your viewpoint. Using gmail for example is an implicit backup of your e-mails. Uploading your pictures to Facebook the same. The move from local, private compute and storage to the cloud solved this issue for many to a degree that it is now less important.

16h agoHN ↗

Let's say SSDs have an annualized failure rate of 1%. (The real figures are from 0.5% for more reliable ones, 1.5% for less reliable ones). The annualized failure rate for HDDs is a bit higher, but let's give it 1% anyway.

Over 40 years (even with changing disks, upgrading PCs, etc.), the chances of you ending up with your data intact is 0.99^40=0.67. May not seem too bad, but this is just a hardware failure of your main drive we're talking about. When you factor in all the other types of screwups that happen, the annualized failure rate will skyrocket.

So a more conservative version of this quote is that a 20-year old today is very likely to experience data loss over his lifetime.

Thankfully with cloud being ubiquitous at least photos are given one copy in the cloud, but IMO even that is risky. People have different appetites for risk, and that's OK. But over the last 20 years the all of our data has become pretty important. I don't know how many people could stomach the loss of important documents, photos, etc.

12h agoHN ↗

~30 years old here, and I can confirm I risked and suffered data loss multiple times. I remember when I still was at my parents house during university I had in mind to build a NAS to properly host the family's photo archive (main reason was bit rot protection, which we experienced, but I was planning for a proper backup as well). But I kept procrastinating. Then, I risked losing it due to a distraction. After spending one week to recover it, building a proper solution to host and backup it became top of my list.

15h agoHN ↗

It’s because they all use cloud services these days which the tech companies manage backups for them. The only risk is getting locked out or banned which is far less common than hard drive failures or malware back in the day.

It’s still vitally important if you are self hosting your data.

8h agoHN ↗

When a person hears someone talk about the importance of backups, but also haven't heard friends/family suffer this date, they will rightfully ignore this warning.

Maybe they just haven't talked to you about it? Most people I know have suffered some form of (partial) data loss or another, and lived with it.

16h agoHN ↗

as long as you run restores every 6 months

uh no, in a company, as a sysadmin, you try your backup files at least every month

16h agoHN ↗

Backups isn't real until it's restored

don't be like me folks

16h agoHN ↗

3 rules of backup (don't remember where i read this)

- do several backups (not using the same hardware brand or host if you do it online)

- check your backup (if something was wrong, you have another backup from the first rule)

- do not store your backups at the same place (if your place get flooded or burn, it will be pretty handy)

16h agoHN ↗

Ran duplicity - it's really a blunt hammer, lots of duplication, rotation, etc.

Then switched to Restic - so much better - highly recommend this.

15h agoHN ↗

“There are two types of people: those who have suffered a catastrophic loss of data, and those who will.”

When I was a teenager, I was the reason for data loss for my dad, twice. Both times it was because I was re-partitioning a hard drive to install linux.

You would think that taught me a lesson about backups, instead it reminds me every now and again to be grateful for an awesome dad and aspire to handle situations with my kid similarly :)

14h agoHN ↗

> “There are two types of people: those who have suffered a catastrophic loss of data, and those who will.”

Also "There are just two types of equipment; those which are already broken and those which will be broken".

I've found a good way to point out anyone thinking right direction not to trust their valuable data in any single entity, product, location, etc.

When I heard it decades ago IIRC 80's Nokia Data Unix courses I went. The distinction made Backups is just 1/3 of the triad Redundancy, Backups, Archives.

1) Redundancy is what you get using RAID, multiple network connectivity etc. ie. good for avoiding single point of failures and avoiding loss service or product availability.

2) Backups are for recovering lost data needed returning lost running known state right before fault or some time state before what backup schedule and used rotation cycle can provide.

3) Archives are meant to saving valuable data not expected to change or active use and but there is need saving much longer periods.

Not seeing and understanding usefulness of difference between these seem hard some people I met over decades. Which then led to confusion, not knowing what they are up to with their data and also often later disappointment when they found out that for example backup programs are not great if you expected archiving instead.

13h agoHN ↗

Reminds me of a story: I was sitting at a restaurant waiting for my food. I casually notice two young children in the next booth playing with a phone, but pay little attention.

Moments later their dad (presumably) comes back and asks for his phone back and sits down with their food. The kids are eating and the dad is fumbling with his phone with odd looks and I can see his frustration growing.

Then out I hear something like "What did you do to my phone?" repeated loudly over and over. "You erased my phone, it's gone."

The small children (guessing) had figured out how to factory reset his phone.

My thought at the time was something like : How many times did I do something as a toddler I don't remember to piss of my dad like that and that he never got mad or brought it up later (Lots of times knowing myself).

13h agoHN ↗

and of course, it doesnt matter that he is their dad, or even that they are small children.

The wise man sees that when a fool has broken his system, its no use getting angry at the fool. Make the system better.

13h agoHN ↗

In this instance, the system worked as designed. Phone got wiped after too many incorrect PIN inputs.

13h agoHN ↗

I had a similar situation. As a kid I used to poke around on my families windows 3.1 PC and break it all the time.

One day I found an interesting new command called DriveSpace, and it looked exciting. I ran it on the C: drive and then got cold feet and cancelled the operation half way through. Needless to say this was a disk compression application, and I had just unknowingly compressed half my hard disk. Took a long time to figure that one out and I was in trouble with my Dad for bit, but we called a few experts we knew for advice and he included me along the journey to fix it. Something I always try to remember when my kids do something similar.

11h agoHN ↗

Same! I decided to reinstall Windows and MBR to GPT conversion (surprisingly!) wiped the whole disk. 10 years of family photos gone. Good thing we had all important ones printed.

15h agoHN ↗

I agree with this sentiment! For our Abejora timesheet SaaS, setting up backups was one of the harder parts. We had to change direction a few times while implementing it.

We finally got a nice setup with CloudNativePG + Barman. This allows for point-in-time restores, but there were a lot of lessons to learn along the way.

- The various types of (database) backups (logical, binary, onsite, offsite, snapshots, write-ahead log...) in combination with the various types of data (database, files, cluster configuration...)

- In our earlier approaches, we tried to preserve the old database volume if it was not corrupt, and use that in our restore. This caused so many complications, because you are fighting the recommended approach. So now, when we need to restore, we always restore from backups and the 'live volume' is dropped.

- For a restore, we just spin up a completely new Kubernetes cluster, instead of trying to restore in-cluster. This is a lot easier.

- Many object stores allow for retention periods, which you can put to good use to prevent malicious or accidental removal of backups. HOWEVER, not all of them are really 'locked'. In some services, you can still override the lock with a forced delete; in others, you can still remove the project holding the storage buckets, which will delete the buckets, and so on... so test those things, instead of just blindly depending on a 'retention period' claim.

- We now automatically run a scheduled restore with verifications on a weekly basis. This requirement does shape your environment, so keep that in mind! There is also the question of how you can reliably and automatically verify that the restore restored the latest data (of a live prod environment). Various solutions exist here, but most are not very elegant!

Honestly, this is only worth it if you are already handling sufficient volume. If you are just starting out, then the easier approach is to just go with a hosted database, which will handle backups and point-in-time restores for you.

15h agoHN ↗

For my small library photos, keepass passwords, etc around 30gb, I use syncthing, which will backup on my pc, on my parents pc (they live in another country), on my sisters pc and on my phone. They also use this triangular mode to backup their stuff. Syncthing is setup to only sync through tailscale or home routers network.

15h agoHN ↗

sync is not backup

Also why you sync through LAN only?

12h agoHN ↗

It's tailscale or local LAN. syncthing allows you to specify multiple addresses for the same peer

tailscale or home routers network

11h agoHN ↗

I was in a vacation and I couldn't connect to a remote pc. And since then I set up wireguard in all routers and I also changed syncthing LAN only.

10h agoHN ↗

Ok, i do use it through their relay but i should do the same

15h agoHN ↗

So you delete a file by mistake and it replicates within seconds? Not exactly a backup. And a malware will do that to all of your files.

11h agoHN ↗

Yes, but I setup syncthing's file versioning to 25, in case of keepass, for example. Also, I set it up that only my PC can send, all other PCs, smartphones, can only receive. Sure, there are still many ways to attack this system, but I still prefer it.

11h agoHN ↗

As long as you have different credentials on all of your machines. I have witnessed first hand that once a malware infects a machine, any machine with shared credentials in the vicinity is infected within seconds.

14h agoHN ↗

Bit rot was mentioned in the article, but then no solution was offered. I also haven't found a good solution, unfortunately. If you only have a couple of Terabytes you could create check sums of everything and then verify regularly, but I feel this approach doesn't scale very well if you have lots of data.

14h agoHN ↗

If you have lots of data, I would suggest using a filesystem designed for this, like ZFS or BTRFS. You would still have to spend in storage though, as ultimately protecting from bit rot requires redundancy.

12h agoHN ↗

I do use btrfs, but I don't really understand how to use it to protect against bit rot. I tried to look into it at some point, but got overwhelmed. Did invest in two backup copies, one of them off site, though.

However, looking at prices, I can see one of those backups just being dismantled to be used as more storage.

9h agoHN ↗

Zfs and btrfs will avoid corruption caused below the file system layer, not something like malware or misuse from a tired sysadmin. I run a tool called integrit that creates checksums and lets me detect non-wanted changes. I only run it on important stuff that does not change too much like photos and videos. Not fun to have to regularly check the log but it works fairly well. This could maybe be extended with automatic checking of the logs.

8h agoHN ↗

If you got overwhelmed in trying to understand how to do it, just do it the easy way: create a ZFS pool of two drives of identical size in mirroring. Then, make sure to have regular scrubs (this means ZFS will regularly check all files for corruption, and recover from eventual errors), use your OS' task scheduler (e.g. Systemd or cron) to run this once a month. This should be sufficient to protect you from bit rot.

5h agoHN ↗

I've currently got two 10TB, one 14TB and one 18TB drive. I don't think what you describe is as easy for me as you expect. I've got one backup in a different city and one in cold storage.

The sizes are all over the place because I only buy a new drive when I run out of storage and then just get the largest one within a reasonable cost. It has been cost prohibitive to mirror everything and current prices aren't encouraging. Neither is the rate at which HDDs get larger. I was kinda hoping for 100TB drives under $400 by 2025 back in 2014, but that hope has been shattered.

14h agoHN ↗

"Also make sure not to run backups at 2AM or 3AM, or things may get scary."

I never though of daylight savings times causing such an issue. Learned something today.

12h agoHN ↗

The only backup system that I truly love and trust (from experience) is Proxmox Backup Server.

11h agoHN ↗

I'm adding this to my list of things that should be simple but aren't. It already contains "Sending a 1GB file to a friend without seeing advertisements" and "Making a mixtape for my friends who are on a different streaming service".

11h agoHN ↗

Some complexity levels not mentioned in the article:

* Consistency groups. The article kinda almost gets there, but stops right before it realizes there's a problem. If you have multiple programs accessing the storage, s.a. a database (that you are snapshotting) and the application using the database, then you are risking an inconsistent snapshot when the database state you wrote is ahead or behind the application state. You need a mechanism to freeze all I/O beside the snapshot in order to ensure that the snapshot data is useful.

* ACLs. And similar external mapping to the storage being used, eg. what if the users come from an LDAP server? Similar problem with symlinks coming from/going to ouitside the snapshot.

* Sparse file support. Let's say you have a few VM images in your snapshot: if your tool doesn't support sparse files, it will likely greatly inflate the image sizes.

Bottom line, either use the product's own snapshot functionality (ZFS has those), or switch to the product that does.

11h agoHN ↗

Thanks for the input. These things never crossed my mind, even the first one which in hindsight should have been obvious to me. I will update the article to include these.

9h agoHN ↗

Yes, yes they are simple. Btrfs and zfs have incredible snapshot and replicate

9h agoHN ↗

There should be a standard for backups, one that makes it possible for a (potentially distributed) system to talk to a backup system and to save or restore a snapshot.

43m agoHN ↗

Hey kids

It’s simple

1) separate data from applications 2) use a real filesystem like zfs or btrfs 3) cronjob snapshot, replicate onsite, replicate offsite 4) monitor size of volumes and snapshots, delete them as your policy 5) periodic zfs and btrfs scrub

End of fucking story. No need for all that tricky shit y’all are doing.