5 ms·
Tarsnap – cleaning up old backups
- tdeck 6y agoI use a great tool called tarsnapper to cull old backups. It lets you configure schedules like "keep daily backups for the last 30 days, then keep a backup every 3 months for the last year, then keep yearly backups".
- commotionfever 6y agoprunef is also good at this tarsnap --list-archives | prunef | xargs tarsnap -d https://git.sr.ht/~apreiml/prunef/ https://git.sr.ht/~apreiml/prunef/
- mfontani 6y agoI strongly recommend "--no-run-if-empty" on xargs pipelines like these.
- LukeShu 6y agoIt depends on which OS you're on. GNU xargs: Normally runs the command at least once, but you can turn that off with "-r" or "--no-run-if-empty". OpenBSD xargs: Like GNU, but only has the short "-r" version of the flag. FreeBSD xargs: Never runs the command if the input is empty, has "-r" (but not "--no-run-if-empty") as a no-op compatibility flag for GNU. macOS xargs: Never runs the command if the input is empty (has no "-r" or "--no-run-if-empty" flags).
- kevans91 6y agoI see no reason not to also provide the compatible long option on FreeBSD: https://svnweb.freebsd.org/changeset/base/365954 https://svnweb.freebsd.org/changeset/base/365954
- mey 6y agoI have two custom python scripts that manage my tarsnap process, one that performs my daily backups (dumps various dbs the performs backups) the other scrubs backups older than 45 days based on the name of the backup skipping over. All automated backups are named with an ISO timestamp. Has worked rather well so far, and when needed I can disable the cron that deletes temporarily if needed.
- tidepod12 6y agoCan someone shed some light on why one might use tarsnap over another service? The tarsnap pricing model seems wild ($0.25/gb/month) considering you can do the exact same thing for 10% the price with something like Borg for deduping/encryption [0] + Rclone for syncing to the cloud [1] + S3 (which is what tarsnap uses on the backend). And this is only one of many different toolsets that can do the same dedupe/encryption/sync. And you can do it for even cheaper using something like Backblaze B2 instead of S3. Despite this, I see tarsnap recommended a lot amongst the tech crowd, but don't understand why. What am I missing? 0: https://borgbackup.readthedocs.io/en/stable/ https://borgbackup.readthedocs.io/en/stable/ 1: https://rclone.org/ https://rclone.org/
- icelancer 6y agotarsnap is simple. The rest of the stuff you mention requires me to set things up and write scripts to wrap it all and sign up for AWS and monitor it and .... Also your method might be much cheaper, but tarsnap is still inexpensive for most use cases. So how much actual money is saved vs. the effort level put in?
- miked85 6y agoIf there is one thing that TarSnap isn't, is inexpensive.
- deleted 6y ago[deleted]
- TimWolla 6y agoI previously used Tarsnap, but I moved to using Borg on rsync.net. Borg can do all the stuff Tarsnap can do and comes with 'borg prune' included. In fact for Tarsnap I would have needed to write a custom script to perform regular pruning. By relying on rsync.net's automated ZFS snapshots I get the same or similar protection compared to Tarsnaps's write-only keys. For my personal use case cost wasn't an issue, though. It's less than 10 GB of data stored.
- seqizz 6y agoUsing tarsnap for my dotfiles, which are ~17mb in total and costs ~$0.0001 daily (lol). Will worth every penny, once you reach it!
- deleted 6y ago[deleted]
- iRomain 6y agoMade by HN user cperciva Funny I just found out through yesterday's thread about top HN comments: https://news.ycombinator.com/item?id=24531972 https://news.ycombinator.com/item?id=24531972
- JetSpiegel 6y agoThere's tsar for doing grandfather-father-son backup rotation: https://support.powertools-tech.com/safonso/tsar https://support.powertools-tech.com/safonso/tsar