Restic: Backups done right

(restic.net)

185 points | by fanf2 16 hours ago ago

85 comments

  • dmw_ng 14 hours ago ago

    I'm a restic user, but have resisted the urge to attempt a bikeshed for a long time, mostly due to perf. It's index format seems to be slow and terrible and the chunking algorithm it uses (rabin fingerprints) is very slow compared to more recent alternatives (like FastCDC). Drives me nuts to watch it chugging along backing up or listing snapshots at nowhere close to the IO rate of the system while still making the fans run. Despite that it still seems to be the best free software option around

    • Svenstaro 5 hours ago ago

      You could try running rustic on your repository. It should be a drop-in for restic and maybe it's faster? I would actually be very interested in this. Would be great if you could do that and report back.

    • nextaccountic 5 hours ago ago

      > It's index format seems to be slow and terrible and the chunking algorithm it uses (rabin fingerprints) is very slow compared to more recent alternatives (like FastCDC).

      Hi, can you elaborate more on those two points? (Specially, what makes the index format so bad?) Or link to somewhere I can learn more

    • rjrdi38dbbdb 6 hours ago ago

      Have you opened issues with suggested algo improvements? They might be open to them.

      Even if restic isn't interested, maybe the rustic dev will be.

  • giuseony 33 minutes ago ago

    Since I'm a big user of proxmox and all my systems are debian-based I recently began to use proxmox backup server also for my physical machines! It's quite fast, supports defuplication and I can donwload or mount backup archives. It sadly lacks a good ux, but I'm still evaulating it because pbs is a tool that I'm already using heavily, so I don't mind reducing the amount of individual software needed to carry on my work.

  • NelsonMinar 11 hours ago ago

    Try BackRest if you want a nice frontend to Restic. You can configure Restic from the command line but it's pretty awkward. BackRest has a nice simple web GUI and makes basic automation very easy. https://github.com/garethgeorge/backrest

    I'm surprised no one is selling Restic hosting as a straight up service. BackBlaze works well with Restic but the configuration is a little manual and clumsy. A packaged solution would be a nice thing.

    Restic is very very good. My only nervousness is the backup format is so opaque, you need a working copy of Restic to restore from it. The format is documented though and of course the code is open source, so I think it's probably fine in practice.

  • kayson 14 hours ago ago

    Other popular choices include borg, duplicity, and duplicati.

    After evaluating these and others mentioned in the comments, I ended up using borg with borgmatic to define homelab backups with yaml files that are version controlled in gitea and deployed using ansible.

    I also use duplicity to back up my sister in laws storefront website to backblaze. I've been quite happy with both.

    https://borgbackup.readthedocs.io/en/stable/

    http://duplicity.gitlab.io/

    https://docs.duplicati.com/en/latest/

    • riedel 14 hours ago ago

      I'd throw in kopia[0], fast, many features and easy to use across platforms.

      [0] https://kopia.io/

      • mongol 12 hours ago ago

        I have seen Kopia mentioned from time to time but never as often as borg. Does it have a good reputation?

        • bityard 8 hours ago ago

          I've been using it for years with zero problems.

    • sph 13 hours ago ago

      I chose restic because borg was slow, buggy and an unwieldy pile of Python, not the best language for deployment on heterogeneous Linux systems.

      Restic on the other hand is slow, but never crashed on me and is distributed as a single binary.

      The only thing I dislike about restic is that it does not have a simple config file where you define your backup settings. Instead I had to write my own backup.sh that I deploy everywhere on my personal and production machines. Paired with rsync.net for storage and healthchecks.io for notifications.

      • kayson 9 hours ago ago

        I've never had any crashing or big issues with borg, and it's generally considered to be faster than restic. I'm sure there are more recent benchmarks, but as of Dec 2022, borg wins by a fair bit [1].

        For installation, I set up a dedicated virtualenv for borg and borgmatic installation then symlink into /usr/local/bin. This is also automated with ansible and has worked on every distro and version I've used. The latest version does require python 3.9.0, but that's already 4 years old.

        1. https://github.com/borgbase/benchmarks

      • 3eb7988a1663 11 hours ago ago

        I write Python day to day, but even I use Restic for the single binary. I take a lot of comfort in being able to keep the backup executable adjacent to the backup blobs. While I believe Borg now has a distributable binary, Go has it in its blood to make easy deployment without tricks.

      • ray_v 12 hours ago ago

        Honest question, but do you not consider environment variables to be a form of simple config?

        https://restic.readthedocs.io/en/stable/040_backup.html#envi...

      • abhinavk 12 hours ago ago

        Use resticprofile or autorestic for configuration file or to run scheduled jobs.

    • leetnewb 14 hours ago ago

      Keeping with the name scheme, there is also duplicacy - https://github.com/gilbertchen/duplicacy

    • layer8 11 hours ago ago

      Duplicity is solid, I’ve been using it since over a decade, and it’s a standard package on Debian-based distributions. Never had any hiccups (and I run regular backup validations).

      These threads about backup tools come up regularly, and I always wonder if I’m missing something important about the other tools.

      • Delk 8 hours ago ago

        I used Duplicity (via the Gnome Déjà Dup GUI) for years, but Borg turned out to be a lot faster at making the backups, at least for my laptop home dir backups. Like an order of magnitude faster. I don't think I ever tried to hand-configure Duplicity, though.

    • o_____________o 5 hours ago ago
    • pixard 13 hours ago ago

      I have tested all of these also, and settled on borg + borgmatic. It has been absolutely rock solid. Borgmatic just rounds everything together in such a nice way. The documentation is great.

      I'm pushing it all to a Hetzner storage box, as well as a local NAS. Super affordable!

    • mikae1 13 hours ago ago

      BorgBackup is also my choice. More features, but that's not necessarily a good (or bad) thing if Restic does everything you need.

    • notherhack 12 hours ago ago

      The Borg site says Windows support is "experimental, no binaries yet". Is that still true?

  • PeterStuer an hour ago ago

    I wish backup program sites would provide an easy upfront capability statement that includes:

    - types of backups supported (volume, fileset, ...)

    - differciality support (incremental, resumable, dedup, ...)

    - support for (always) open file bakup

    - filetype/ path restrictions (very large files, max pathlenght, ...)

    - restore options ( bare metal, selective, backup mountable as volume, ...)

    This would make it far easier to see if it ia worth checking out

  • thekashifmalik 14 hours ago ago

    Big fan of restic! The only feature I found missing was the ability to browse historical snapshots like regular files.

    I wrote and now use the rsync-based, browsable, incremental backup CLI: https://rincr.com/

    • dmd 14 hours ago ago

      What do you mean by that? "restic mount" has been part of restic since the very start.

      • thekashifmalik 13 hours ago ago

        That command works well and accomplishes some of what rincr what built to solve. For example, when I mention browse-ability, I mean on the backup host without any dependencies so I can use standard file tools and browsers.

        I also needed both "pull" (backup remote files) and "push" (backup local files) backup features and if I'm not mistaken restic still only supports the "push" model.

        EDIT: Added more details

        • homebrewer 13 hours ago ago

          If you're doing pull to prevent remotes from destroying old backups (in case of malware takeover, etc), this can be solved by running rest-server with --append-only

          https://github.com/restic/rest-server

          It 403's any attempt to overwrite or delete old data.

        • rakoo 11 hours ago ago

          > I mean on the backup host without any dependencies so I can use standard file tools and browsers.

          This means the backups are not encrypted though, and is something you really have to think twice before requiring

          > "pull" (backup remote files)

          You can mount the server to backup on the backup host, or you can ssh from the backup host to the server to backup, call `tar cf - /folder`, and ingest that from stdin on the backup host. Both will retransmit the totality of the files to backup

        • luoc 12 hours ago ago

          Browsing without dependencies is a bit tricky due to a) deduplication, b) encryption and c) compression of restic's backups.

    • heinrichf 14 hours ago ago

      Restic has a mount subcommand that exposes all backups through a FUSE filesystem, no?

    • tetris11 9 hours ago ago

      Only feature missing for me was passwordless backups

    • demomode 14 hours ago ago

      Isn't that the purpose of `restic mount`?

  • aborsy 14 hours ago ago

    Restic is great! It has worked flawlessly for me for several years.

    Anyone knows if there is plan to add Reed Solomon erasure coding, just in case there will be errors in repository? Something like Par2.

    Asymmetric encryption could also be useful in some situations. Perhaps they could just use Age for the asymmetric encryption backend (unfortunately Age offers only 128 bits of security in its symmetric encryption, so it’s not recommended for long term storage, because of the save-now decrypt-later attack). But I expect a stable quantum resistant plug-in appearing next year or so.

  • manuel_w 11 hours ago ago

    Which one is more resistant to bitrot, Restic or Borg Backup?

    (Yes, bitrot might better be mitigated at the filesystem layer, but I'm not switching to ZFS, btrfs or bcache-fs anytime soon.)

    • ajvs 3 hours ago ago

      Not sure but I know that Vorta (borg GUI) does automatic consistency checking using `borg check ` regularly.

    • rodgerd 5 hours ago ago

      One thing that I like about Restic is that you can automatically do a test restore of a subset (e.g. 1%, 5%, 8%) of your data, so that you can check for problems on the remote automatically.

  • andarp 15 hours ago ago

    I have used restic for a year now. I’ve thought about it twice. 9/10 would backup again.

  • CGamesPlay 7 hours ago ago

    I built a tool on top of restic to host git repositories on untrusted infrastructure. Its been working fine for my small low traffic projects for years, I only sync the fork every few months. https://github.com/CGamesPlay/git-remote-restic

  • anotherevan 11 hours ago ago

    I've been using Restic for servers, but ended up going with Kopia for machines that are not always on, like laptops. It has the advantage that it will take something of an opportunistic approach where it will start backing up if it hasn't done so in a while, and seems to be able to restart with aplomb if it gets interrupted (machine shutdown or laptop lid closed).

    That and being able to have multiple machines writing to a shared repository at the same time is handy. I have the kids' Windows computers both backing up to the same repo to save a bit of storage. (Now if only Kopia supported VSS on Windows without mucking around with dubious scripts.)

    • mariusor 3 hours ago ago

      I think the first part could be solved by systemd timers, no?

  • alibert 15 hours ago ago

    Been using Restic for a while but I was wondering how does it compare to:

    - Rustic https://rustic.cli.rs

    - Kopia https://kopia.io

    • aliasxneo 15 hours ago ago

      I perused the Rustic website and they have a direct comparison of Restic here: https://rustic.cli.rs/docs/comparison-restic.htm. At face value I thought it was just, "because it's Rust," but it does appear to have a few additional features.

      I haven't used either, though.

      • tredre3 14 hours ago ago

        Rustic was started by a former restic contributor. My impression at the time was that he was frustrated with poor collaboration from restic maintainers (slow/no response to his PRs). So it's a bit more than just "rewrite-it-in-rust".

        Many of his rejected/ignored restic PRs ended up being features in rustic: cold storage support, config file support, resumable operations, webdav server, etc.

        • tacticus 10 hours ago ago

          "rewrite-it-in-rust-wrapping-c"

      • dicytea 14 hours ago ago
    • asteroidburger 15 hours ago ago

      Rustic is a rewrite of Restic from Go to Rust. See https://rustic.cli.rs/docs/comparison-restic.html

      • rjrdi38dbbdb 6 hours ago ago

        It looks nice, but until they support FUSE mounting, I'll stick with restic.

    • Scandiravian 14 hours ago ago

      I switched to rustic a couple of months ago due to it being able to filter based on .gitignore files. Have done a few test restores and everything has worked well so far

    • snorremd 14 hours ago ago

      A killer feature rustic has over restic is built-in support for .gitignore files. So all your dependencies and build output is automatically ignored in your backups.

      • githubalphapapa 7 hours ago ago

        At first I thought that sounded great, but then I realized that that would exclude files that I want to be backed up, like `dir-locals-2.el`, which should be excluded from git, but should also be backed up. There doesn't seem to be a great solution to that in general.

      • neilv 13 hours ago ago

        Nice. Using `.gitignore` would simplify my Restic, Borg/Borgmatic, and Rsync-based backup scripts/configs. (Right now, I end up duplicating the same information in a few places, not very well.)

    • riedel 14 hours ago ago
    • BoingBoomTschak 14 hours ago ago

      I vaguely remember Kopia having partly mitigated Restic's issues with memory usage.

  • nh2 8 hours ago ago

    Faster alternatives I recommend:

    * Kopia: many features, also great for desktop GUI users

    * bupstash: The fastest, lowest RAM. I use it to backup 1B files daily (200TB). Ransomware-proof asymmetric multi key crypto. Less features.

    • aftbit 7 hours ago ago

      bupstash is new to me. That looks like a cool set of properties. I do wish it supported S3 and compatible APIs as a backup target.

      • ajvs 3 hours ago ago

        Relevant: Borg 2.x now supports rclone to allow S3-compatible hosts.

  • crabique 10 hours ago ago

    Restic is awesome for moderate operational scale, but when it's got to backup thousands of storage block devices with arbitrary number of files on them, it just doesn't really work.

    Is there anything cool people use for Ceph-RBD backups nowadays?

    For now, the only thing in the OSS world that doesn't choke at this scale is Benji, but it looks like it's not really maintained anymore, and I worry it may not support newer Ceph versions.

  • evanjrowley 14 hours ago ago

    There is also autorestic - A simplified YAML-based configuration for dealing with Restic backups: https://github.com/cupcakearmy/autorestic

    • justusthane 12 hours ago ago

      I hadn’t seen autorestic before so I can’t compare them, but there’s resticprofile

  • chrchr 14 hours ago ago

    My Thinkpad has a tiny SDHC slot. I put a 1 terabyte SDHC card in it (~$80) and have a cron job take hourly Restic snapshots of my primary storage. It's been reliable and has bailed me out more than once.

    • immibis an hour ago ago

      Make sure to verify it against bitrot. SD cards aren't the most reliable media.

  • ritcgab 7 hours ago ago

    Duplicity is my go because it integrates so well with pgp signing/encryption. Other popular alternatives like borg and restic just do not have it.

    • aftbit 7 hours ago ago

      I do wish there were a way to allow a machine to perform backups without also allowing to read them. I generate per-machine secret keys for restic, then encrypt those keys to a set of GPG recipients, and store them alongside the backup data. I did have to roll my own solution for this using s3cmd etc but its not too bad.

  • notherhack 12 hours ago ago

    Restic 0.17.1 was released last month. The home page says "During initial development (versions prior to 1.0.0), maintainers and developers will do their utmost to keep backwards compatibility and stability, although there might be breaking changes without increasing the major version."

    So worth a peek but still under construction.

  • pixelmonkey 11 hours ago ago

    Discussion of my approach to using restic + rclone + Backblaze B2 here:

    https://news.ycombinator.com/item?id=41041056

  • gmuslera 14 hours ago ago

    I’m more fan of BorgBackup, but you have to couple it with I.e. rclone for it to make backups to cloud object storage. But that opinion is based on my particular use case, probably would be using restic if direct to cloud was a better choice.

    • pdw 14 hours ago ago

      Borg 2.0 supposedly will support cloud backups out of the box.

  • dang 14 hours ago ago

    Related:

    Restic 0.17.0 Released - https://news.ycombinator.com/item?id=41082937 - July 2024 (5 comments)

    Restic – Simple Backups - https://news.ycombinator.com/item?id=38915291 - Jan 2024 (14 comments)

    Restic 0.15.0 Released - https://news.ycombinator.com/item?id=34364925 - Jan 2023 (1 comment)

    Restic 0.14.0 Released (with highly anticipated feature – compression) - https://news.ycombinator.com/item?id=32599032 - Aug 2022 (5 comments)

    Restic 0.13.0 - https://news.ycombinator.com/item?id=30822631 - March 2022 (66 comments)

    Restic – Backups Done Right - https://news.ycombinator.com/item?id=29209455 - Nov 2021 (286 comments)

    Saving a restic backup the hard way - https://news.ycombinator.com/item?id=28438430 - Sept 2021 (2 comments)

    Restic Cryptography (2017) - https://news.ycombinator.com/item?id=27471549 - June 2021 (5 comments)

    Restic – Backups Done Right - https://news.ycombinator.com/item?id=21410833 - Oct 2019 (177 comments)

    Show HN: K8up – Kubernetes Backup Operator Based on Restic - https://news.ycombinator.com/item?id=20769362 - Aug 2019 (18 comments)

    Append-only backups with restic and rclone - https://news.ycombinator.com/item?id=19347188 - March 2019 (42 comments)

    Restic Cryptography - https://news.ycombinator.com/item?id=15131310 - Aug 2017 (36 comments)

    Restic – Backups done right - https://news.ycombinator.com/item?id=10135430 - Aug 2015 (1 comment)

  • Jur 15 hours ago ago

    Interesting, I'll give this a try. I'm hoping one day to retire my subscription/cloud-based back-ups with something docker based that still back-ups to multiple instances (local and remote).

  • SomeoneOnTheWeb 14 hours ago ago

    I've tried many options and ended up distching Restic for Borg and then Borg for Kopia, which was IMO the best option.

  • yapyap 15 hours ago ago

    Awesome, I’m using BackInTime right now for ’snapshot’-like backups but I’m always interested in new solutions

  • npace12 13 hours ago ago

    first time I heard of this was yesterday, in a thecatch2024 CTF. Today, on HN... https://www.thecatch.cz/

  • tguvot 15 hours ago ago

    https://github.com/garethgeorge/backrest going nicely with restic

    i do miss functionality of configurable full/incremental backups like in duplicity

    • kam 15 hours ago ago

      What do you miss about it? In restic, every snapshot has the speed and size of an incremental backup, but the functionality of a full backup.

      • tguvot 13 hours ago ago

        sometimes you just must have a new full backup every N days/weeks. it a more "smooth" way to deal with potential corruption in repo that might be undetected (without dealing with all suggested workarounds) and in some cases compliance/certification requires it

    • Jnr 11 hours ago ago

      Backrest is great. It makes it very easy to configure restic backups and do the restores.

  • slig 14 hours ago ago

    What's the best way to backup a managed Postgres from DO to another cloud?

    • fmajid 14 hours ago ago

      Not sure what DO managed PostgreSQL supports, but PostgreSQL streaming replication would seem like the natural way to go.

      • slig 13 hours ago ago

        They don't support that, forgot to clarify that in my comment. Thanks!

  • lossolo 11 hours ago ago

    Pruning takes forever in Restic, which is why we migrated away from it.

    • Sakos 11 hours ago ago

      What did you migrate to?

  • cvalka 13 hours ago ago

    Rustic is better