Live data from Hacker News

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

borgbackup.readthedocs.io

81–90 of 124 posts

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

#81
post #78

For personal use, at what point would one recommend using Borg over a regular rsync? I currently use rsync to backup up a set of directories on a drive to another drive and a remote service (rsync.net). It's been working great, but I'm not sure if my use-case is just simple enough where this is a good solution, or if I'm missing a big benefit of Borg. I do envy Borg's encryption, but the complexity of a new tool tied…

For me, the deduping and compression saves a lot of storage. My mail backup (17 backups covering the last 6 months) is originally 837GB, compressed to 312GB and dedupe'd to 19GB. Same with Postgres - 25GB to 7GB to 900MB.

You could probably use rsync's hard linking to save space on the mail backup but I'm not sure you'd get it as small without faffing about.

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

#82
post #48
post #22

Earlier quoted context omitted.

It's very sane: encrypt the bits, then send it to the host. Curious what you think is not right with their methods.

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 NOT…

Author of HashBackup here.

Duplicity is very old backup software that uses the "full + incremental" strategy on a file-by-file basis, like tape backup systems. The full backup must be restored first and then all of the incrementals. This becomes impractical over time, so as with tapes, you must periodically repeat the full backup so the incremental chains do not become too long.

Modern backup programs split files into blocks and keep track of data at the block level. You still do an initial full backup followed by incrementals, but block tracking allows you to restore any version of any file without restoring the full first and all following incrementals. The trade-off is in complexity: tracking blocks is more complex than tracking files.

It has nothing to do with encryption.

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

#83
post #76

Earlier quoted context omitted.

You may also be interested in borgmatic's (beta) "spot" check, which compares your backup archive's files to your source files: https://torsion.org/borgmatic/docs/how-to/deal-with-very-lar...

Nice! This looks really awesome and practical. Thank you so much.

Sure thing! If you have any feedback on how it works (or doesn't) for you, please feel free to file a ticket.

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

#84
post #14
post #12

Earlier quoted context omitted.

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.

> 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?

The provider should not. It provides a false sense of security.

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

#85
post #44

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

Author of HashBackup here.

To use modern block-based backup programs for large databases and VM images (similar situation), you must use a very small block size for dedup to work well. For VM images, that's 4K. For databases, it's the page size, which is 4K for SQlite and 16K for InnoDB by default.

With very small block sizes, most block-based backup programs kind of fall over, and start downloading lots of data on each backup for the block index, use a lot of RAM for the index, or both. So it's important that you test programs with small block sizes if you expect high dedup across backups. Some backup program allow you to set the block size on a per-file basis (HashBackup does), while others set it at the backup repo level.

To backup a database, there are generally a couple of options:

1. Create an SQL text dump of the database and back that up. For this to dedup well, variable-sized blocks must be used, and the smaller the block size, the higher the dedup ratio.

2. Backup the database while running with a fixed block size equal to the db page size. You could lock the database and do the backup, but it's better to do two backup runs, the first with no locking, and the second with a read lock. The first backup cannot be restored because it would be inconsistent if any changes occur to the database during the backup. But it does not lock out any database users during the backup. The second backup will be much faster because the bulk of the database blocks have already been saved and only the changed blocks have to be re-saved. Since the second backup occurs with a read lock held, the second backup will be a consistent snapshot of the database.

3. The third way is to get the database write logs involved, which is more complex.

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

#86
post #70

Earlier quoted context omitted.

> set and forget for me and after 7 years Please tell me you verify your backups now and then?

This always gets repeated, sounds good and makes sense theoretically but in reality there's no good way to do that and it should be the job of a computer to that. Restoring one file from the backup, works but what if something else is corrupted? Restoring the system from the image, works but what if some directory is not in the backup and you don't see that while testing?

borgmatic's "spot" check (probabilistically) protects against both of those failure modes: https://torsion.org/borgmatic/docs/how-to/deal-with-very-lar...

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

#87
post #86
post #70

Earlier quoted context omitted.

This always gets repeated, sounds good and makes sense theoretically but in reality there's no good way to do that and it should be the job of a computer to that. Restoring one file from the backup, works but what if something else is corrupted? Restoring the system from the image, works but what if some directory is not in the backup and you don't see that while testing?

borgmatic's "spot" check (probabilistically) protects against both of those failure modes: https://torsion.org/borgmatic/docs/how-to/deal-with-very-lar...

Indeed, I think these kind of automated checks are much more helpful than telling people they have to "test" test their backup. If a backup software doesn't do that automatically and reports if there's something off it's not good software or user experience.

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

#88
Does anyone have an up-to-date comparison of Borg vs Restic? Or a compelling reason to switch from Restic to Borg?

I've previously used Borg, but the inability to use anything other than local files or ssh as a backend became a problem for me. I switched to Restic around the time it gained compression support. So for my use-case of backing up various servers to an S3-compatible storage provider, Restic and Borg now seem to be equivalent.

Obviously I don't want to fix what isn't broken, but I'd also like to know what I'm missing out on by using Restic instead of Borg.

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

#89
post #37

Earlier quoted context omitted.

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.…

https://docs.syncthing.net/users/versioning.html

Indeed; I know and use it. But it's per file, and not very configurable.

It's not very helpful is you e.g. have a 1 GB file that gets appended 100 kB every day; Syncthing would store a new full-size copy in each version (immediately usable), while Borg / Restic / Kopia would only store the deltas (and would require slow mounting to access a particular version).

Different tools for different jobs.

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

#90
post #70

Earlier quoted context omitted.

> set and forget for me and after 7 years Please tell me you verify your backups now and then?

This always gets repeated, sounds good and makes sense theoretically but in reality there's no good way to do that and it should be the job of a computer to that. Restoring one file from the backup, works but what if something else is corrupted? Restoring the system from the image, works but what if some directory is not in the backup and you don't see that while testing?

I think the point is that if your data is valuable enough for you, you can't really trust that option in the backup tool to work - maybe you misunderstood some config option and the test now isn't really run, the tool is broken, or is run only on some of the backup files or dirs etc... or your original config might have missed a folder because it was mounted through some other filesystem (happened to me with Borg actually, and my whole /home/user dir especially wasn't backed up for the first 6 months I ran it :).

Seems to be good to have another tool that you either manually or automatically can setup to run regularly that tries to locate random files from your existing file system in the backups? Something like that.. though that other tool might be broken as well of course... :/

Post reply on HN