BorgBackup 2.0 supports Rclone – over 70 cloud providers in addition to SSH

(borgbackup.readthedocs.io)

204 points | by AdaX 14 hours ago ago

65 comments

  • Helmut10001 10 hours ago ago

    BorgBackup user here and really happy. It was a set and forget for me and after 7 years, the deduplicated backup is still working flawlessly each week. I recommend pairing it with borgmatic [1], which helps to design away some of the complexities of the underlying borg backup.

    [1]: https://github.com/borgmatic-collective/borgmatic

    • jszymborski 9 hours ago ago

      Or, if you're using a desktop environment and prefer a GUI, Vorta has been treating me well.

      https://vorta.borgbase.com/

    • rubenbe 2 hours ago ago

      Does someone know a good Android client?

    • mbrumlow 8 hours ago ago

      > set and forget for me and after 7 years

      Please tell me you verify your backups now and then?

      • Helmut10001 6 hours ago ago

        Borgmatic runs consistency checks [1] once a month on all repositories and archives and I occasionally retrieve older versions for selected files (archives with --verify-data only once a year or whenever I feel the need - there's 9TB of data in the borg repo, which takes a bit to scan). Note though that borg is not my main backup, it is the fallback "3" in the 3-2-1 principle, where my primary data is a ZFS Raidz2 and my primary backup is an offsite ZFS Raidz2 in pull mode. I added borg because I did not want to rely on a single software (ZFS), although this fear was unstained so far.

        [1]: https://borgbackup.readthedocs.io/en/stable/usage/check.html

      • selcuka 6 hours ago ago

        > Please tell me you verify your backups now and then?

        Then one can't call it "set and forget", right?

        • semanticist 5 hours ago ago

          Backup testing can be automated. I don't do this for my personal stuff, but at work there's a box that does a restore of our primary DB from backups, loads it into MySQL, and runs some smoke tests to make sure it looks roughly right. A quick script and a cronjob, and backups get tested every night.

          I'm sure there's more thorough ways to do this kind of testing, but whatever level of confirmation you need automating it should be viable and then you only have to pay attention if/when something breaks.

  • krick 7 hours ago ago

    Currently I'm just using bare rclone to backup to my own remote machines, but obviously this isn't very professional solution. Was thinking to add Backblaze B2 as a remote, but I guess using rclone wouldn't be a state-of-the-art solution here. After all, it isn't really a backup tool, is it? It has some built-in encryption, but it's a bit clunky, and I'd think a proper backup tool should automatically divide data into blocks of suitable size (instead of just creating file-per-file - to make it S3/B2 API-friendly), encode whole directories as tar (if needed to preserve links, for example), do deduplication, and whatever else are best practices I have no idea about, but which backup-proficient people probably invented long time ago.

    Does anybody have a recommendation?

    I briefly looked at restic and duplicati, but surprisingly none are as simple to use as I'd expect a dedicated backup-tool to be (I don't need, and kindda don't want GUI, I'd like all configuration to be stored in a single config-file I can just back-up to a different location like everything else, and re-create on any new machine). More than that, I've read some scary stories about these tools fucking up their indexes so that data turns out to be non-restorable, which sounds insane, since this is something you must be absolutely sure your backup-tool would never do no matter what, because what's even the point of making backups then.

    • scorpioxy 7 hours ago ago

      Whether something is simple or not I'd say depends on the use case. But I found borg to be great. I'd recommend you check it out and go through the quickstart guide in the documentation. It does de-duplication and encryption. It does a lot more but you don't have to use those features if you don't need them. I couple it with borgmatic to implement a backup and disaster recovery procedure that is meant to decrease the risk of data loss. I also use borgbase and they have a good service but using something like B2 with this rclone support would result in a cheaper alternative if you don't need the extra that borgbase provides.

      I've been using it for quite a while now both for my personal projects and paid work and have had a good experience with it.

    • RockRobotRock 7 hours ago ago

      >I'd like all configuration to be stored in a single config-file I can just back-up to a different location like everything else, and re-create on any new machine

      You might want to look into kopia. It accomplishes the same task as restic, but handles configs in a way you might find more appealing. Further reading: https://news.ycombinator.com/item?id=34154052

      Don't even bother with duplicati. I've tried to make it work so many times, but it's just a buggy mess that always fails. It's a shame too, because I really like the interface.

    • abhinavk 7 hours ago ago

      restic + autorestic/resticprofile.

      Borg 2 is still beta and Kopia is also there. But it's newer so I am testing it on another redundant backup on the same machine. I have space so why not?

      Every once in a while I run integrity check (with data) so I can trust that metadata and data are fine.

  • rmoriz 31 minutes ago ago

    It's a joy that the OSS world has so many active and really good backup tooling projects like Borg, restic and all the fancy wrapper/GUI tools. I use many of them in different environments for customer setups, desktops and my own cloud setup. It's essential to have several different options and each project has its own USP. A big thanks to everyone involved!

  • mrbigbob 17 minutes ago ago

    I remember reading quite a few years ago about people working to get Borg to work with windows. Has there been any recent progress with that?

  • nickcw 3 hours ago ago

    Writing an rclone backend for borg is something I have wanted to do for a long time.

    However I found that the backends weren't well abstracted enough in v1 to make that easy.

    However for v2 Thomas Waldmann has made a nice abstracted interface and the rclone code ended up being being only <300 lines of Python which only took an afternoon or two to make.

    https://github.com/borgbackup/borgstore/blob/master/src/borg...

  • dang 7 hours ago ago

    Related. Others?

    Borg 2.0 beta (deduplicating backup program with compression and encryption) - https://news.ycombinator.com/item?id=40990425 - July 2024 (1 comment)

    Borgctl – borgbackup without bash scripts - https://news.ycombinator.com/item?id=39289656 - Feb 2024 (1 comment)

    BorgBackup: Deduplicating archiver with compression and encryption - https://news.ycombinator.com/item?id=34152369 - Dec 2022 (177 comments)

    Emborg – Front-End to Borg Backup - https://news.ycombinator.com/item?id=30035308 - Jan 2022 (2 comments)

    Deduplicating Archiver with Compression and Encryption - https://news.ycombinator.com/item?id=27939412 - July 2021 (71 comments)

    BorgBackup: Deduplicating Archiver - https://news.ycombinator.com/item?id=21642364 - Nov 2019 (103 comments)

    Borg – Deduplicated backup with compression and authenticated encryption - https://news.ycombinator.com/item?id=13149759 - Dec 2016 (1 comment)

    BorgBackup (short: Borg) is a deduplicating backup program - https://news.ycombinator.com/item?id=11192209 - Feb 2016 (1 comment)

  • scorpioxy 10 hours ago ago

    Oh very interesting. This has been a requested feature for a while especially with the rise in popularity and the decreased cost of object storage.

    Borg working with object storage was not supported though some people did use it that way. From my understanding, most would duplicate a repo and upload instead of borg directly writing/manipulating it. This could problematic if the original repo was corrupt as now the corruption would be duplicated. So this will make things much easier and allow for a more streamlined workflow. Having the tool support rclone instead of specific services seems like a wise and more future-proof choice to me.

  • elric 4 hours ago ago

    I've happily been writing borg backups to rsync.net for years. They have support for forcing borg in the ssh session using force-command, and borg has options that can prevent deletion (should the backup ssh key be compromised).

    Overall it's a robust solution that isn't too painful to setup.

    • unbrice 4 hours ago ago

      I second this. I was looking for a solution that prevented a compromised host from deleting its own backups. Forcing the command as you mentioned works for rsync.net, and its snapshots also provide a protection against fat finger errors.

  • cstuder 8 hours ago ago

    If you're looking for cheap online storage for your backups know this: A Microsoft 365 Single subscription comes with 1 TB of OneDrive space (Family subscriptions with 1 TB per person).

    I've been using it with restic + rclone successfully for years. It's not very fast, but works.

  • aquafox 6 hours ago ago

    Also BorgBackup user here: I'm running it on a Raspberry Pi to backup important documents to a Hetzner storage box via ssh. The Pi als runs OpenMediaVault to provide a SMB share on my home LAN. So whenever I scan a new document, just put it on the SMB share and from there it's backed up automatically every day.

  • mendym 10 hours ago ago

    is there a reason to use the borg encryption[1] over rclone crypt[2] or vise versa?

    1. https://borgbackup.readthedocs.io/en/2.0.0b11/quickstart.htm... 2. https://rclone.org/crypt/

    • aborsy 9 hours ago ago

      Rclone crypt is not much related to Borg. That’s a tool for copying files from one machine to another, in this case encrypting before copying. That’s rsync, working with cloud.

      Borg is a different tool, for backup. It deduplicates, encrypts, snapshots, checksums, compresses, … source directories into a single repository. It doesn’t work with files, rather blocks of data. It includes commands for repository management, like searching data, pruning or merging snapshots, etc. You will then transfer or sync the repository to wherever you want, with a tool such as rsync/SSH or rclone. Rclone is now natively supported, so that you don’t need to store the repository locally and on remote, rather back up directly to remote.

    • misanthr0pe 10 hours ago ago

      I would also wonder what the difference between this package and Restic is. as far as efficiency and encryption.

    • freeqaz 9 hours ago ago

      How good at deduping is this when encryption is enabled? I was looking at rsync.net and it killed me that they don't support encryption in a sane way.

      • djbusby 8 hours ago ago

        It's very sane: encrypt the bits, then send it to the host.

        Curious what you think is not right with their methods.

        • freeqaz 5 hours ago ago

          Sure, but there is some requirement to not just blindly copy everything over-and-over, and that is where I've seen things get tricky before. If you enable encryption you have to re-upload the entire snapshot periodically.

          It's annoying because if you have TBs of stuff that blows. I'm just curious what systems exist for incremental, encrypted backups that don't require full uploading new snapshots.

          See here in the NOTE section. Re-reading this, it might a limitation of Duplicity. https://www.rsync.net/resources/howto/duplicity.html

      • mendym 9 hours ago ago

        > they don't support encryption in a sane way.

        Should the storage provider provide support for encryption on their end? Would you not want to store the keys locally?

  • wzyboy 7 hours ago ago

    I've always been doing "two-pass" backups to achieve "3-2-1" goal: first pass is to run BorgBackup to backup devices to my home server. The second pass is to use rclone to transfer the repos on home server to an object storage service (B2).

    With rclone support built-in, the setup would be much easier.

    • cl3misch 6 hours ago ago

      I think this is heavily discouraged? Instead you should have multiple separate borg repos to minimize risk of misconfiguration and data corruption.

  • swoorup 4 hours ago ago

    New to Borg, and backups in general.

    Does borg have the ability to split chunks over multiple repository of varying sizes? For example, I might have just 15GB Google Drive Storage, whereas on others I might have 100GB available.

  • tandav 10 hours ago ago

    The lack of s3-like remotes support was the reason I switched from borg to restic

    • synergy20 10 hours ago ago

      rclone has dedupe, I think it does what restic can do plus multiple cloud support.

      rclone crypt also does encryption.

      so far I think rclone has it all for me.

      • aborsy 8 hours ago ago

        Rclone doesn’t have deduplication. That’s just finding files with the same name. It’s different from deduplication used in backup software.

        Think of grinding data in a big machine, and removing blocks that are redundant. You may have every file to be a single copy, and get significant space reduction.

        • leetnewb 4 hours ago ago

          Rclone also has a hash-based dedupe mode. Still different from borg, but it can be a little more robust than name-based.

      • wongogue 9 hours ago ago

        They also work together. restic uses rclone for backends other than the officially supported 7. rclone also has built-in restic integration.

        rclone on it own is a syncing solution not backup.

        • RockRobotRock 7 hours ago ago

          >restic uses rclone for backends

          This is cool. It sounds like I can set up restic to copy my backups to multiple S3 buckets, or even to an S3 bucket at the same time as a local drive using a union (https://rclone.org/union/) remote

      • larschdk 5 hours ago ago

        rclone and restic are not direct alternatives. They have a slight overlap, but are also different. Rclone is more versatile for moving/copying files. Restic has snapshotting, pruning, client side encryption, deduplication, and compression. Restic actually supports rclone as a backend.

      • thangngoc89 9 hours ago ago

        Restic also offers encryption and compression. That’s the selling point for me when dealing with dozens of TB

  • eternityforest 7 hours ago ago

    So, should I plan to switch to this rather than keep using Kopia?

    I was using it for years on an external drive, but then I got a NAS, and did not want to fuss with community packages to get Borg working.

    Kopia works fine, aside from the confusing GUI setup process, but it seems to be the least popular up and coming option.

    Now it seems that this can directly target SFTP? I wonder what that means for the future of Kopia.

    • _flux 5 hours ago ago

      Kopia also supported rclone for a long time, though: https://kopia.io/docs/reference/command-line/common/reposito... . However, in my experience backing up over sftp with kopia can be very slow. I suspect it's unable to use parallel sessions for them (or pipelining, but rclone API probably doesn't do that).

      My reason to go with kopia was that previously you were not able to backup multiple hosts into the same repo without great inefficiencies. I'm not sure if they still have resolved that. Another was its native S3 support which I use with ceph.

      A perhaps more superficial personal reason is that at least Go is a statically typed language, even if its type system isn't that great..

  • wg0 6 hours ago ago

    How can we use it for large database backups > 500 GB and is anyone doing that on daily basis?

    • Havoc 2 hours ago ago

      As long as borg is running on both ends it should hash it I think

  • jas39 5 hours ago ago

    Too late Borg! I specifically chose Restic for the Rclone support. Can't change backup strategy now. It also save me once.

    Pcloud lifetime + Restic, all in one repo, to benefit from dedup.

  • singhrac 9 hours ago ago

    It wasn't recommended a bit ago to use Borg 2.0 because it wasn't baked enough. Has that changed? Are people using Borg 2?

    • aborsy 9 hours ago ago

      It is still in beta, and has been in this state for a long time. At some point, the developer thought to delay it further and introduce whatever breaking changes are needed in this release.

      Note that if you use, say, the 2.11 version, you cannot upgrade to 2.12, you cannot go back to 1.X either. People like me were stuck, it turned out you have to discard the repo. Sometime later they better clarified this point:

      >> Borg2 is currently in beta testing and might get major and/or breaking changes between beta releases (and there is no beta to next-beta upgrade code, so you will have to delete and re-create repos).

      I have a 2.X repo. It’s working fine and backs up. I have a lot of snapshots in that repo. If someone knows how to transfer them to a 2.X version once it’s out of beta, let me know.

    • DistractionRect 9 hours ago ago

      Author calls that out right at the top of the changelog:

      > Beta releases are only for testing on NEW repos - do not use for production.

      • singhrac 6 hours ago ago

        That's fair. There's a lot of software that is generally ok to use in beta, however, and this has been in beta for a long time.

        • Freak_NL 5 hours ago ago

          Beta is beta. Hard to fault the developer using this label correctly with a clear notice for the way some other projects treat 'beta'.

  • locusm 9 hours ago ago

    I quite like Borg, others worth checking out are Restic and Kopia. Restic didnt have a UI for a long time, not sure thats changed...

    • wongogue 9 hours ago ago

      Nope. No configuration file either. But they added compression recently.

      autorestic or resticprofile fill the gap well. Backrest does UI.

      • locusm 8 hours ago ago

        Backrest looks like a great find.

  • cyberax 9 hours ago ago

    Interesting. How robust is it in practice?

    I've been using Duplicacy for a long while, and I've been pretty happy with it. But I'd love to switch to a full open-source solution (Duplicacy is proprietary with sources publically available).

  • IshKebab 5 hours ago ago

    I used to use Borg but the fact that it can't work with a dumb storage device like SMB meant I eventually moved to Rustic, which is even better:

    https://github.com/rustic-rs/rustic

    • snorremd 4 hours ago ago

      I see they have gotten support for S3 (and other storage providers) via OpenDal. Might need to revisit rustic for my backup needs then! I once started looking at what it would take to build a GUI using Tauri (Rust backend <-> JS/Web frontend), but didn't have time to figure out the APIs.

      What I really like about Rustic is that it understands .gitignore natively so you can backup your entire workspace without dragging a lot of dependencies, compiled binaries, and other unnecessary data with you into your backups.

  • immibis 3 hours ago ago

    That's really big and really nice. For anyone unfamiliar, rclone is to online storage what ffmpeg is to multimedia files: a Swiss army knife that adapts anything to anything. It supports everything from S3 and Azure storage, to Google Drive and Dropbox, to sftp mounts; encryption and compression layers too.

  • 0xbadcafebee 8 hours ago ago

    It's kind of ridiculous that there is better tooling for Kubernetes to sync files two ways than there is for the Linux desktop. Rclone is a maze of options, which vary based on version/distro. The configurator is a slow readline console script without enough information. The one decent GUI for Rclone has been abandoned, and despite being able to save "tasks", had no ability to just... schedule one every 10 minutes. And yet if you go into most distros and look at packaged Internet apps, or things on Flatpak, you will find 1,000 different open source GUIs for an RSS reader, BitTorrent client, or chat client.

    I would love it if there were some kind of "Linux Desktop co-op", with a couple of staff. Users pay membership dues, vote on apps/features, and some devs get paid to develop it, in addition to "resume fame" that can translate over to a higher paying gig. But something tells me the Linux Desktop is so small and nerd-focused that we'd just end up funding more RSS readers and chat clients.

    • RockRobotRock 7 hours ago ago

      I'm not sure what you're on about. This started as a rant on rclone's CLI options, but ended on desktop Linux.

      rclone is mostly the work of one guy. You can donate to him if you'd like. Making a GUI for a complex, rapidly evolving CLI is not an easy thing to do. There's probably a hundred different attempts to make a good interface for ffmpeg, but you can't please everyone.

    • darthrupert 8 hours ago ago

      Syncthing?

      • nine_k 7 hours ago ago

        Syncthing is great, but it's peer to peer, and it requires block storage ("filesystem"). It also has no idea of point-in-time snapshots. Syncthing, is, as is unison, rsync, etc, basically a mirroring tool.

        By contrast, Borg, Restic, Kopia (anything else?) use object storage, aka binary blobs, like S3 or R2 or One Drive. They store both entire copies and small diffs on top of them, much like video codecs, or like git. You can look at the filesystem you've backed up as it was in a particular moment, and you may have a history of many such moments, say, daily snapshots for a month, stored economically, not as 30 full copies. And it all is encrypted on top. If your source FS supports snapshots (ZFS, XFS on LVM, BTRFS), your backups can be entirely consistent views of your filesystem, of its relevant subtrees.

    • dddw 6 hours ago ago

      NextCloud?