MacOS client 2022

Thread to track macOS client status.

Current versions:

2.4.x

https://beta.urbackup.org/macos/UrBackup%20Client%202.4.12-2.pkg

2.5.x (beta branch)

https://beta.urbackup.org/macos/UrBackup%20Client%202.5.16.pkg


Current todo list for the macOS client:

  • :green_square: Fat-binaries/separate installer for Apples ARM64 transition

Nice to have:


Please test! Thanks.

1 Like

Latest changes (with 2.4.12-2/2.5.16):

  • @Moisie reworked macOS excludes. They are now done in code
  • @ravenclaw900 Fixed scaling issues by setting something in the app configuration
  • @Moisie adjusted excludes for Monterey
  • @Moisie removed the login-item setup as the client UI is started via launchctl
  • @Moisie added a full disk access check on launch

Hi there.
Not sure if this is the best place to ask for help with the Mac clients so please let me know if not!

So, I’ve got two MacBook clients backing up to a urbackup server where the filesystem is BTRFS.
Both MacBook clients’ log files always say
Backing up "root" without snapshot
which I find odd given that the server’s backup filesystem is BTRFS (and none of the non-mac clients use this phrasing).

I can see that subvolumes are made for the clients backups in the BTRFS filesystem by using btrfs sub list DIR, so I don’t know if this message is actually an issue or not…

Server is urbackup 2.4.13 in a docker container.
Client version is 2.5.16 (does it matter that the client and server are different minor versions?)
Host OS is ubuntu 20.04

Thank so much.

That refers to what’s happening on the client machine, I’m unfamiliar with Macs, have one ancient one, but it’s running Windows 7, so it uses VSS for snapshots. What (if any) snapshot mechanism(s) are available in MacOS?

I think Big Sur onwards can take APFS snapshots? Actually I thought that time machine has some kind of snapshot capability but I could easily be wrong here.

There is a nice to have, open task to integrate it with TimeMachine/APFS snapshots. See the OP

Indeed - the Mac client does not currently create snapshots on the client system, hence the warning.

Yes - that’s correct - but the feature is not profoundly accessible for third-party applications, without specific support from Apple.

Indeed - it’s on the list, but no ETA (from my end, anyway).

Hi there.

With the most recent Mac client on Monterey I’m finding my backups tend to fail more than 50% of the time.

17/05/22 20:10 DEBUG Reflink copying is enabled
17/05/22 20:10 DEBUG Reflink copying is enabled
17/05/22 20:10 INFO Starting unscheduled incremental file backup…
17/05/22 20:10 DEBUG macbook: Connecting for filelist…
17/05/22 20:10 DEBUG macbook: Waiting for filelist
17/05/22 20:10 DEBUG macbook: Connecting for filelist (async)…
17/05/22 20:22 INFO macbook: Loading file list…
17/05/22 20:22 DEBUG macbook Starting incremental backup…
17/05/22 20:22 INFO macbook: Calculating file tree differences…
17/05/22 20:22 INFO macbook: Creating snapshot…
17/05/22 20:22 INFO macbook: Deleting files in snapshot… (5645)
17/05/22 20:23 INFO macbook: Deleting files in hash snapshot…(5645)
17/05/22 20:24 INFO Waiting for metadata download stream to finish
17/05/22 20:24 DEBUG Waiting for metadata download stream to finish (attempt 0, macbook). 10s since last meta-data transfer. Forcefully shutting down after 2m 20s without transfer.
17/05/22 20:24 DEBUG Waiting for metadata download stream to finish (attempt 1, macbook). 20s since last meta-data transfer. Forcefully shutting down after 2m 20s without transfer.
17/05/22 20:24 ERROR Error starting file metadata download thread
17/05/22 20:24 ERROR Backup had an early error. Deleting partial backup.

This is a fairly typical log file. This did not happen while on Big Sur with the previous Mac client.
Brute forcing the backup retries eventually makes it work.

My Mac client is 2.5.16
My server is 2.4.13 (docker)

Any tips/advice?

Hi,

Thanks for the feedback. Could you have a look at the log file on the Mac to see if there’s anything of interest in there?

/Library/Logs/urbackup_client_backend.log

Thanks.

Hi @Moisie

Sorry for the delay. I’ve attached a sanitised log file from the start of a recent transfer that failed.

I’ve also copied the server log printout for the backup to correlate timings.

I cannot see anything except that I start to see error messages in the client log at the same time as the server. Does anything jump out at you?

24/05/22 12:15 DEBUG Reflink copying is enabled
24/05/22 12:15 DEBUG Reflink copying is enabled
24/05/22 12:15 INFO Starting scheduled incremental file backup…
24/05/22 12:15 DEBUG macbook: Connecting for filelist…
24/05/22 12:15 DEBUG macbook: Waiting for filelist
24/05/22 12:15 DEBUG macbook: Connecting for filelist (async)…
24/05/22 12:19 INFO Backing up “root” without snapshot.
24/05/22 12:19 INFO Indexing of “root” done. 204337 filesystem lookups 0 db lookups and 0 db updates
24/05/22 12:19 DEBUG macbook: Doing backup with hashed transfer…
24/05/22 12:19 INFO macbook: Loading file list…
24/05/22 12:19 DEBUG macbook Starting incremental backup…
24/05/22 12:19 INFO macbook: Calculating file tree differences…
24/05/22 12:19 INFO macbook: Creating snapshot…
24/05/22 12:20 INFO macbook: Deleting files in snapshot… (5897)
24/05/22 12:21 INFO macbook: Deleting files in hash snapshot…(5897)
24/05/22 12:21 INFO Waiting for metadata download stream to finish
24/05/22 12:22 DEBUG Waiting for metadata download stream to finish (attempt 0, macbook). 10s since last meta-data transfer. Forcefully shutting down after 2m 20s without transfer.
24/05/22 12:22 DEBUG Waiting for metadata download stream to finish (attempt 1, macbook). 20s since last meta-data transfer. Forcefully shutting down after 2m 20s without transfer.
24/05/22 12:22 DEBUG Waiting for metadata download stream to finish (attempt 2, macbook). 30s since last meta-data transfer. Forcefully shutting down after 2m 20s without transfer.
24/05/22 12:22 DEBUG Waiting for metadata download stream to finish (attempt 3, macbook). 40s since last meta-data transfer. Forcefully shutting down after 2m 20s without transfer.
24/05/22 12:22 DEBUG Waiting for metadata download stream to finish (attempt 4, macbook). 50s since last meta-data transfer. Forcefully shutting down after 2m 20s without transfer.
24/05/22 12:22 DEBUG Waiting for metadata download stream to finish (attempt 5, macbook). 1m since last meta-data transfer. Forcefully shutting down after 2m 20s without transfer.
24/05/22 12:23 DEBUG Waiting for metadata download stream to finish (attempt 6, macbook). 1m 10s since last meta-data transfer. Forcefully shutting down after 2m 20s without transfer.
24/05/22 12:23 DEBUG Waiting for metadata download stream to finish (attempt 7, macbook). 1m 20s since last meta-data transfer. Forcefully shutting down after 2m 20s without transfer.
24/05/22 12:23 DEBUG Waiting for metadata download stream to finish (attempt 8, macbook). 1m 30s since last meta-data transfer. Forcefully shutting down after 2m 20s without transfer.
24/05/22 12:23 DEBUG Waiting for metadata download stream to finish (attempt 9, macbook). 1m 40s since last meta-data transfer. Forcefully shutting down after 2m 20s without transfer.
24/05/22 12:23 DEBUG Waiting for metadata download stream to finish (attempt 10, macbook). 1m 50s since last meta-data transfer. Forcefully shutting down after 2m 20s without transfer.
24/05/22 12:23 ERROR Error starting file metadata download thread
24/05/22 12:24 ERROR Backup had an early error. Deleting partial backup.

urbackup_err.log.txt (179.1 KB)

Hi @absolution

Thanks for sending the logs through.

TBH I’m shooting in the dark here - but try excluding /Library/Application Support//UrBackup Client/var/urbackup/ from your backup set. This is based on these entries in your client log:

2022-05-24 12:19:59: FileSrv: Sending file (normal) urbackup/tokens_b1bg7ItHesBG9Pf4eyWE.properties metadata_id=0
2022-05-24 12:19:59: FileSrv: Mapped name: /Library/Application Support/UrBackup Client/var/urbackup/data/tokens_b1bg7ItHesBG9Pf4eyWE.properties
...
2022-05-24 12:20:59: FileSrv: 1 min Timeout deleting Buffers (1024 KB) and waiting 1h more...

These correspond with the start of the server log entries, saying it’s waiting for the metadata download stream to finish…

Hi @Moisie

Thanks for the info. I’ll give this a try and report back.

Hi again @Moisie
Unfortunately, adding /Library/Application Support/UrBackup Client/var/urbackup/ to my excludes did not work.
Please let me know if you think of something else I could try.

Yep, I have also tried adding mentioned code in the excludes. However, it did not work. Another approach is needed.

Hi @absolution and @sandersbud4

Thanks for the feedback; can you please confirm you are both backing up the root of the filesystem?

I don’t yet have any further thoughts on what to look at, but I will investigate…

Hi @Moisie

I am backing up the root filesystem. I have added some exclusions, which are:
/Users/USERNAME/Library/VoiceTrigger;/Applications/Xcode.app;/Library/Developer/CommandLineTools;/Applications/Divinity - Original Sin 2.app;/Applications;/Users/USERNAME/Library/Mail;/private/var/db/SystemKey;/Library/Application Support/UrBackup Client/var/urbackup/

I mostly avoid a few items that are very large and tended to slow the backup too much (the slowness came from me using an SMR disk)

1 Like

Please let us know as soon as possible after reaching a conclusion. I will be waiting.

Hi @absolution

Sorry - I’ve only just noticed that you wrote this:

If you’re using server version 2.4, you should also use client version 2.4. I suggest you uninstall the 2.5 client from your Mac, and install 2.4 client instead - link at the top of this thread.

@sandersbud4 - I don’t suppose this would apply to you too? :pray:

Hi @Moisie
I did try this awhile ago, but the server then assumed my mac was a new client, and did not associate the backup history to it. Is it possible to roll back the version while keeping my backups linked to my Mac?

I should also add that I’ve been using this client version since before I updated my Mac to its latest OS version, and did not have this issue until now.

Hi @absolution

I might be wrong, but I think:

  • If you just uninstall and reinstall but keep the Application Support folder in place, all your settings should be preserved - so I would expect it to identify itself as the same machine;
  • If not, then as long as the Computer Name is the same and you’re using the same Internet Authentication key, I believed the server will see the client as the same as before.

Of course, YMMV…

Indeed - but from the logs, I can’t see anything amiss at the ‘purely client’ end of things. I think it’s more likely the communication between client and server that’s falling over here.