r/backblaze • • 2d ago

Computer Backup Backblaze should open source their computer backup client

At least for MacOS, there are so many issues that people bring up, from actual bugs to missing UI. I feel like Backblaze should open source their computer backup client so that the community can help fix things or at least own how they backup their data.

From the mac side in this subreddit:

  • bztransmit hogs up tons of RAM with no way to configure a ceiling. bztransit can't be permanently killed; it always just restarts
  • bzserv and bztransmit also hog up CPU and RAM (or this article). There are tons of articles and GitHub diagnostic scripts detailing the poor design on the client end how these resources are burned
  • bztransmit -fixsafetyfreeze can be frozen for days due to a bug
  • Manual backups stop at some random file count number (I'm currently stuck at 271k files/550GB with 3TB already backed up from years of backing up). Support has never solved it properly and don't really know what to do (including if you read logs). The common solution is to just nuke the backup.

Anecdotally:

  • Manually pressing Backup Now doesn't work a lot for me
  • You have to nuke your Backblaze client to fix things... or nuke your whole backup (which sucks if you have slow upload speed)
  • A lot of issues require coding knowledge, specifically running things in Terminal. If you ever wanted to exclude certain folder names, not just a specific path, you have to edit an XML file.

Let people fix your client or make their own at this point. Community support on GitHub means everyone shares tickets and can pool resolutions together, letting AI agents help out.

edit: F. I tried uninstalling and reinstalling backblaze because of the hang. There's a bug in the client. And then after inheriting backup state, memory shot up to 61GB RAM out of 64GB, and then failed. Cry

69 Upvotes

37 comments sorted by

6

u/silajim 2d ago edited 2d ago

I have decompiled it this past weekend, and made changes to the ram hogging part, currently I am validating the changes.

It used to need about 16GB of ram to process some stuff and about 2-4 hours (22.4M files , 40TB) now it uses 1.3GB of ram and it's done in seconds on the housekeeping tasks!

I will NOT give people the changes, but I will try to contact Backblaze themselves to see if they will want to integrate the changes and optimizations I've made.

EDIT: The internal design how the bztransmit part works and stores data is quite horrible, an example during a server delete (from the server, it send it old files that have not been backed up during a period) it will read every bz_done file for every entry that it wants to delete.

In my case the bz_done files are 104GB and the list to delete contained a bit more that 70K items. Meaning that to clean up the bz_done files it would need to read something like 7.2TB of data!

EDIT 2: Ohh and it had a memory leak, go figure

2

u/pywang 2d ago edited 2d ago

crazy stuff. memory leak not surprising. legacy code written in cpp

Would much rather have the client simply open sourced rather than have an unsupported lib fwiw

I think people have previously analyzed how backblaze does the transmit, and the design apparently has been the same for the last 15 years (something about an append only log)

maybe there could be a workaround that compacts bz_done (marking changed files in general) like a sidecar while still allowing bztransmit to handle the upload

2

u/silajim 2d ago

The bz_done files already as compact as they can be, the problem is that they don't have an index, you have to scan all the file to find an entry,

I am monitoring what I've made for like a week or so, I have plans to make a sort of diff file, of what was changed since the last time it was read, this way loading the whole bzfileids into memory will not be neede, reducing even more the ram requirements.

Indeed the whole things feels like it was made 15-20 years ago, and left in a state of "it works" but never put any thought into optimizing further.

2

u/brianwski Former Backblaze 1d ago

the whole things feels like it was made 15-20 years ago

On January 15, 2027 it will be exactly 20 years since I wrote the first lines of code in the client.

It evolved since then for sure. When I worked at Backblaze, the general philosophy was to improve it, but always in a backward compatible fashion (so never force a total repush or “migration” for all customers). The best example is in the bz_done files each line starts with either a “4” or a “5”. It implies how to parse the rest of that one line. For the first five years it was always “4” (versions “1”, “2” and “3” never were released to external customers). Anybody who installed AFTER a certain date for the first time only have line version “5”. Customers who first installed before that date but updated after that date have both version “4” lines and version “5” lines in those files. There wasn’t a migration, the code knew how to handle both line versions.

But I have no idea if Backblaze moved to a line version “6” by now, or how they handle these things now. My aesthetic was never break backward compatibility, but I have no idea if that was a good or bad idea. Other programmers have different aesthetics and value other things. Preserving backward compatibility has a cost to it, it makes the code have more complexity.

If you want to move fast, you break backward compatibility. I honestly don’t know what the correct philosophy is. The BEST situation is when a product can be extended and sped up without changing formats. But the worst situation is when the programmers are limited and realize a major flaw exists that requires breaking compatibility. Then we are just stuck with an inferior design.

3

u/pywang 1d ago

The underdeveloped UI and your explanation of backwards compatibility seems to actually be more of a philosophy of user friendliness or seamlessness from a business side. To me, the performance and user experience seems like an under delivery of the philosophy Backblaze is gunning to present itself as.

I suppose I don't see why Backblaze can't simply offer users the ability to have both a breaking change client that radically redesigns the data upload flow (maybe even a complete restart of the upload if necessary) while also maintaining the old/current client. Is there anything in the current backblaze client that would require tons of maintenance besides keeping up with backend changes? And now with AI agents, I just don't see maintaining the old client as an issue for the most legacy users or finding a way to port bz_done to a new format.

2

u/brianwski Former Backblaze 1d ago edited 1d ago

I suppose I don't see why Backblaze can't simply offer users the ability to have both a breaking change client that radically redesigns the data upload flow (maybe even a complete restart of the upload if necessary) while also maintaining the old/current client.

One of the “constraints” is that Personal Backup not only has a client component, but a pretty involved server side block of code and functionality. The target audience of Personal Backup was not sophisticated IT professionals, so we wanted to support the idea of optionally restoring only one file through a web interface without requiring ANY native client be installed. The minimum bar was having access to a web browser.

What that implies is the server side needs the ability to get a username/password/2factor, and possibly handed the Private Encryption Key, then the server has access to create a “tree view” of the user’s files on the server side web GUI, all so the user can choose 1 or 2 files and download them.

In turn, this means the client and server have to agree on formats. In this design, if the client side adds a new format that is faster/better these other parts of the entire ecosystem ALSO need to grow intelligence around that:

  1. Web portal restore.
  2. Server side old version cleanup. If a customer has “One Year Version History” the server side prunes the restores of any any old versions older than one year, as long as there is a newer version of the file with the same file name.
  3. Various other features like USB hard drive restores cannot break.
  4. The mobile clients have to be updated.

ALL OF THIS MEANS: The implications for the programming efforts to add new (not backward compatible) functionality span at least 4 independent teams of programmers inside Backblaze.

Office Politics and how busy each team is: let’s say the client team wants to add something, but the server team is utterly swamped doing something else. Management has to decide which is more important. A B2 feature for “enterprise customers” might be crushing them with 12 hour work days. Which puts off releasing the client feature. The judgement call management needs to make requires a “business case” be made for the new feature. That can scuttle a new feature that dies in committee.

None of us programmers have ever found a better way of making these decisions. Any small company without much legacy code can move faster inherently because there are fewer people that have to agree on things. Any large company with a million customers and multiple types of customer moves slower.

One of the earliest “friends and family investors” in Backblaze is a very senior technical employee at Apple. He told me recently if Apple releases a new OS once per year, it is about 2 weeks of programming, and 50 weeks of testing, QA, fixing up legacy code, negotiations between groups, etc.

This is just how it is. Big established companies move slower for valid reasons. One idea I banter around is that maybe the correct model of development is a new, smaller company with no legacy in place can be formed to build an incompatible backup client - and that is a good thing. It does not break a single existing customer using Backblaze. It does not confuse existing Backblaze customers with confusing choices. Anybody who wants can install this new backup client, and even have BOTH running: Backblaze Personal Backup AND the new company’s backup client. By definition neither is allowed to “break” the other company’s product.

For bonus points, this new company can make SO MUCH MONEY for the 3 or 4 employees. If there is a business case for a feature Backblaze cannot finish in the next 5 years, that is a 5 year free pass to print money.

About 80% of Backblaze’s efforts were building the server side. We had to assemble our own hardware because nobody sold storage at a rational price in 2007. All that changed. With B2, a new backup company gets all the storage for the same cost as Backblaze Personal Backup gets storage. It is already built, maintained, durable. A new company of 4 employees just needs to write a compelling backup client, which is the easy part. It is free money. I wish somebody would do it.

2

u/pywang 20h ago edited 20h ago

Hi Brian I appreciate the response!

free money

There are plenty of alternatives, but no one can beat price/unlimited storage of Personal Backup vs using B2 as the storage tier. No alternative can beat the branding of Backblaze. Alternatives thus far have always been niched to technologists and never able to expand generally, so there really isn't free money for 3-4 employees. It's mostly reserved to single person, open source software.

This is just how it is. Big established companies move slower for valid reasons... With B2, a new backup company gets all the storage for the same cost as Backblaze Personal Backup gets storage.

It sounds like the Backend team is spread across both B2B and B2C rather than one backend team dedicated to the Personal Backup client. It also sounds like the Personal Backup doesn't use the B2 interface? Like the Personal Backup backend has its own backend, but then the upload of user files to storage doesn't sound like it uses the B2 interface which would make changes decoupled and necessitate less communication with the B2 team. It's also at that point equivalent to a separate company.

I guess I won't ponder, sorry. Though established companies need to ensure reliability , it just sounds like a management inertia/orientation issue. I think the real way forward for the vast majority of the Personal Backup market was if Backblaze would just improve their client since alternatives will forever be niche. I doubt we'd ever see this low differentiation market see a Backblaze equivalently sized competitor.

That is unless someone started some personalized compute/productivity AI startup, and paired that with personal backup as a bundle like Microsoft's business tactic.

4

u/silajim 1d ago

Currently I am not changing the files format, but I do have a new parser, that works faster, but the output is the same as the one included in the latest version (bugs and all,mostly)

Currently in both parsers, seem to be working the same, with the same caveats, but the new one is just faster, but I have some ideas on what to do for the next file format

2

u/goro-n 2d ago

It basically was, the original author used to be very active on this sub and personally answer questions, but he's now retired.

5

u/brianwski Former Backblaze 1d ago

but he's now retired.

I’m still around lurking (not employed by Backblaze), but my information is so out of date (3 years), it is difficult for me to answer definitely about stuff now. Like even I experienced the large RAM footprint on Mac recently, which was a bug that an update fixed, but I do not know which versions had the bug, and I don’t know the exact client version that fixes it, and more importantly I don’t know the details of what went haywire temporarily, and if all customers would be fixed simply by checking for updates or not.

I’m on mobile traveling right now, but I get back late Saturday (2 days) and when I have an actual keyboard I will try to put some thoughts down.

4

u/silajim 1d ago

Oh, hello I will be waiting for more of your thoughts when you are back

2

u/silajim 2d ago

Yeah, I had quite a few in depth discussions with Brian

1

u/mike1487 1d ago

Check out https://duckdb.org/ and running the list files through that. It’s quite powerful and fast. I thought about doing something similar myself but I’ve since moved on to other things and am not a backblaze personal customer anymore but it’s cool to see people looking into this longstanding problem.

1

u/silajim 1d ago

I do not understand what this is, probably it has no place in what I am doing

1

u/mike1487 1d ago edited 1d ago

It’s an in process DBMS. You were mentioning how the files don’t have any index which is the crux of a lot of the performance overhead and issues with backblaze’s client. DuckDB is kinda like SQLite but you can read in any data or flat file and work with the data using SQL language and have lots of benefits that databases have including indexing. I figured part of what you were working on was refactoring the flat files for a database solution. Are you a programmer? You understand decompiling so I assumed you knew database concepts.

2

u/silajim 1d ago

I understand DB and much more, but the page is not clear, it's super vague on what it is, and how it works, like if it was vibe coded. I did pass it through claude, and said it was more for logs and stuff like that.
I am not working on refactoring the current files, but I do have some ideas if the Bz team wants to listen to them

1

u/Lilianne_Blaze 17h ago

Could you please consider at least making available a mod with artificial slowdowns removed or reduced?
All the "pausing for 4 seconds to lighten disk I/O" and similar shite?

2

u/silajim 10h ago

I will say a "Maybe" if the Backblaze people agree to it. Like I don't wanna create a situation where what I've made has issues that I have not caught yet.

1

u/privatejerkov 9h ago

The trouble is, I don't think they have an incentive to take aboard being told that the software is terrible and how things are currently done are terrible and inefficient. They will defend the way it is instead of owning up and correcting it.

3

u/dr100 2d ago

using Backblaze B2 even though it's more expensive at my scale (new recalculation at 4.2TB, but likely more if I encrypt it myself)

There you have it. They didn't increase the price on B2 from $6/TB to $7/TB just earlier this year because they can make money from storing your stuff for 2.x/TB . Your "issues" are actually pushing the customers that aren't profitable to either a multiple times more expensive service or away completely (which is still a win if they were eating more resources than paying for).

Meanwhile they can very well make money from people happy with the "unlimited" service while the largest (by far) cohort of them literally stores 0.0 TBs.

3

u/pywang 2d ago

Yea I get it’s a business strategy. Doesn’t mean I can’t complain. If they’re offering computer backup regardless of storage size, then the profitable v unprofitable cohort balance is part of their business equation.

the B2 price increase is because of long term storage device market supply snagging, not the computer backup profitability. Prices have been skyrocketing for HDDs and SSDs.

4

u/wormeyman 2d ago edited 2d ago

I actually had Claude look at what was messing up my backblaze so much. I'll post the results in a quick edit once I'm on my desktop.

Edit: OK, here's what I found. My Mac was uploading 100k-190k files a day to Backblaze. Almost all of it was cache and dependency folders that change constantly, like node_modules, .venv, browser caches and app plugin folders.

The exclusions in Settings > Exclusions only match the full path from the root of the drive. Backblaze's docs say excluding a folder "excludes any folder with that name regardless of location", but my logs say otherwise.

Their own default list excludes /Library/ and /Applications/, yet ~/Library uploads every day (over 4,000 files today), and ~/Applications uploads whenever an app in it changes.

A full path like /Users/you/.cache works fine in the settings. A plain folder name doesn't.

Also tick "Also exclude Apple-specified exclusions" on the same Exclusions tab. It makes Backblaze skip whatever Time Machine skips, which covers a lot of system and cache files. It doesn't fix the problem with folder names, though, since dev folders like node_modules aren't on Apple's list.

To exclude a folder name wherever it shows up, add a line like this to /Library/Backblaze.bzpkg/bzdata/bzexcluderules_editable.xml:

<excludefname_rule plat="mac" osVers="*" ruleIsOptional="t" skipFirstCharThenStartsWith="users/" contains_1="/node_modules/" contains_2="*" doesNotContain="*" endsWith="*" hasFileExtension="*" />

Matching ignores case. Keep the slashes on both sides of the name. skipFirstCharThenStartsWith="users/" limits the rule to folders under /Users. Backblaze applies the change at its next backup. To make it read the file right away, restart the service:

sudo launchctl kickstart -k system/com.backblaze.bzserv

If something goes wrong, delete that file and Backblaze puts its default rules back at the next backup.

These are the names I added:

  • /node_modules/
  • /.cache/
  • /.venv/
  • /library/pnpm/store/
  • /cache/cache_data/
  • /code cache/
  • /service worker/cachestorage/
  • /.vite-plus/js_runtime/
  • /library/application support/crossover/bottles/

The cache ones catch Chrome and Electron apps.

Now it uploads about 3,600 files on a normal day, and the spikes are real new files.

To see what yours is uploading, look in /Library/Backblaze.bzpkg/bzdata/bzlogs/bzreports_lastfilestransmitted/. Each log is named after a day of the month (for example 02.log). The newest day or two are plain logs and older days are zipped. The names get reused every month, so check the dates inside each file.

1

u/pywang 2d ago

I think it'll vary between everyone's bugs. I've never heard of my current case before, but apparently there is a sync error between a previous backup state and a current file list. The bug prevents bztransmit from actually running due to a script param called -fixsafetyfreeze I've already nuked the backup.

There are also issues where if you haven't backed up backblaze in awhile and tried upgrading backblaze's client, it wouldn't work either, having me stuck at a constant base number of files that would never upload. I've had a lot of issues that essentially boil down to using Backblaze B2 even though it's more expensive at my scale (new recalculation at 4.2TB, but likely more if I encrypt it myself)

2

u/wormeyman 2d ago

That's rough. My fix has dropped it down to 32 megabytes of RAM.

1

u/pywang 2d ago

Appreciate you sharing for everyone though. I also initially didn't have my package managers and their caches excluded, and uploading tons of files is definitely worse than one large one. I think the client generally doesn't get enough attention in my opinion.

2

u/unitof 1d ago

~/Library and ~/Applications are different from /Library and /Applications.

Weird about file names matching full path only and not folder/filename itself despite documentation. Have you tried editing some of the XML exclusion preference files manually?

2

u/brianwski Former Backblaze 1d ago

Disclaimer: a long time ago I worked as a programmer on the client team at Backblaze.

~/Library and ~/Applications are different from /Library and /Applications.

Honestly, I will never understand why Apple re-used the same names in two locations. It has caused so much confusion and lost productivity in the world. Probably millions of hours destroyed, all of which could be saved if Apple named one location /Library/ and the other location /Users/<username>/repository/

Or one location /SystemLibrary/ and the other location /Users/<username>/UserLibrary/

There are so many excellent choices here and Apple chose the worst possible name conflict.

1

u/wormeyman 2d ago edited 2d ago

If you want to have your own AI agent, take a look:

I use Backblaze Computer Backup on a Mac, and it keeps re-uploading huge numbers of files and eating CPU and RAM. Please find out what it's uploading and help me exclude the junk. Go step by step, and ask me before you change anything.

Here is what I know about how Backblaze works on macOS:

  • The upload logs are in /Library/Backblaze.bzpkg/bzdata/bzlogs/bzreports_lastfilestransmitted/. Each file is named after a day of the month (NN.log for the newest day or two, NN.zip for older ones). The names get reused every month, and a day with no uploads keeps last month's file, so go by the date at the start of each line, not the file name. A big file shows up as several "Chunk N of /path" lines, so count each path once. Small files are grouped under a "Multiple small files batched in one request" line, with one "- /path" line per file below it. Look at some real lines first, since the format may differ between versions.
  • The settings are in /Library/Backblaze.bzpkg/bzdata/bzinfo.xml. The folder exclusions from Settings > Exclusions are the bzdirfilter entries. Backblaze's docs say excluding a folder "excludes any folder with that name regardless of location", but in practice they only match the full path from the root of the drive. Check this against my logs: the defaults exclude /library/, yet ~/Library usually still uploads. use_time_machine_excludes in myprefs is the "Also exclude Apple-specified exclusions" checkbox.
  • To exclude a folder name wherever it appears, add an excludefname_rule line to /Library/Backblaze.bzpkg/bzdata/bzexcluderules_editable.xml with contains_1="/name/". Matching ignores case. Copy the format of a rule already in that file rather than writing one from scratch. Backblaze's docs say exclusions apply at the next backup. To make it reread the file right away, restart the service: sudo launchctl kickstart -k system/com.backblaze.bzserv
  • If the edited file causes trouble, deleting it restores Backblaze's default rules at the next backup. Backblaze support won't help with edits to this file.
Steps: 1. Start read-only. Count the files uploaded per day for the last two weeks, and list the top 20 folders by upload count. For each one, tell me what it is and whether it's safe to skip (caches, dependency folders like node_modules and .venv, package stores, browser and Electron caches, and anything else that rebuilds itself) or whether it holds real data I'd want back. 2. Show me the current exclusions and whether Apple's exclusions are turned on. 3. Propose the rules you'd add as a list, then wait for my OK. Leave out anything that holds my own files, and don't exclude a whole folder when only a cache inside it is changing. 4. Once I agree, copy bzexcluderules_editable.xml to a backup next to it with today's date in the name, then add the rules. If you can't write to the file, tell me the command to run. 5. Give me the restart command to run myself, since it needs my password. Don't run sudo yourself. 6. Tell me how to check again in a few days (which log to read and roughly what count to expect), so I can see whether it worked. Don't delete anything, don't touch the backup itself, and don't uninstall or reinstall Backblaze.

2

u/wasthespyingendless 2d ago

Dang I thought you were giving the prompt for creating an open source version of their app. 

2

u/wormeyman 2d ago

Sorry! It's just to automate the exclusions.

15

u/shrinking_cultist 2d ago

Yeah the ram hogging is so annoying.

1

u/sammcj 2d ago

Just switch to using Kopia and b2 storage. Much faster and open source.

1

u/pywang 1d ago

Thanks for sharing. Wish Backblaze would simply improve the client is all.

1

u/Pariell 2d ago

I just want to be able to resize the control panel. It's 2026 ffs.

1

u/Lilianne_Blaze 17h ago

It would be very nice, but the probability of it happening is near zero. Open-sourcing the client would make it trivial to modify it so for example it treats remote filesystems as local, allowing to back up tens or hundreds of pcs to one unlimited account

1

u/Chemical_Tea_1743 3h ago

Unfortunately, money is the only way to get some of these companies’ attention. 

Cancel your subscriptions. Go elsewhere. When they see >100, >50, heck even >25 accounts a week leaving their platform, it’s going to raise bells after their monthly or quarterly reporting/meetings. 

1

u/yuletide 3h ago

It’s a huge resource hog