MacOS client 2021

Thanks @Talkabout

Here’s another build, this time peppered with logging messages throughout the ClientConnector::replaceSettings function. Please try with this version and do the same thing, and post the outcome here again - this will help narrow down exactly where the failure is happening.

https://drive.google.com/file/d/1K_w1q2liVc7Wcwtjx9EBV5stVA158-ap/view?usp=sharing

Hi @Moisie ,

done what you said, here is the output

2021-06-07 17:09:34: DBG replaceSettings 1
2021-06-07 17:09:34: DBG replaceSettings 2
2021-06-07 17:09:34: DBG replaceSettings 3
Process 73856 stopped
* thread #7, stop reason = EXC_BAD_ACCESS (code=1, address=0x0)
    frame #0: 0x00000001004dd29d urbackupclientbackend`ClientConnector::replaceSettings(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&) + 1741
urbackupclientbackend`ClientConnector::replaceSettings:
->  0x1004dd29d <+1741>: movq   (%rax), %rcx
    0x1004dd2a0 <+1744>: movq   0x28(%rcx), %rcx
    0x1004dd2a4 <+1748>: leaq   -0x18a0(%rbp), %rdi
    0x1004dd2ab <+1755>: movq   %rax, %rsi
Target 0: (urbackupclientbackend) stopped.

Thanks!

Bye

Thanks @Talkabout - I think I’m going to have to hand this over to someone who knows what they’re talking about better than I now…

It looks like it’s failing on line 1956 of urbackupclient/ClientService.cpp:

if(!ncname.empty() && ncname!=IndexThread::getFileSrv()->getServerName())

…but I couldn’t tell you why this should be the case on your system alone!

It could be a race which becomes apparent because starting the file server takes long on this client (because getting the computer name on macOS).

Best fix would perhaps be to start the filesrv+index thread before accepting command (like replace settings), i.e. moving down this line:

@Moisie Could you move it down, check if it works then build a package to see if that fixes it?

@Uroni Many thanks for this. I’ve built the package with this change, and it successfully loads on my build VM.

@Talkabout please try it from here: https://drive.google.com/file/d/1L2musyzL5f-QWVHheJrqX3i1p34Kqo_7/view?usp=sharing

[Note: as I’m building off the 2.4.x branch, the highlighted line was at line 400 of dllman.cpp; I moved it to just before this line:

internetclient_ticket=InternetClient::start(do_leak_check);

Please let me know if I’ve misunderstood your instructions!]

I’ve applied Moisies pull requests and the previously discussed change here:

2.4.x

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

2.5.x (beta branch)

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

If I get confirmation it works, I’ll update the top post…

Hi @uroni ,

for me this version does not work at all:

  • the context menu of the urbackup client taskbar icon only shows “Access Backups”, “About…”, “Status” and “Uninstall”
  • trying to debug it I get the following error: macOSTaskPolicy: (com.apple.debugserver) may not get the taskport of (urbackupclientba) (pid: 15628): (urbackupclientba) is hardened, (urbackupclientba) doesn’t have get-task-allow, (com.apple.debugserver) is a declared debugger

With the previous version provided by @Moisie debugging was possible and also I was able to see “Settings” in the context menu.

Bye

Hi @Talkabout

Thanks for the feedback; could you please clarify which version you’re referring to here:

I suspect @Uroni’s builds don’t have the debug symbols included, so you’d be best trying the version I posted for now: MacOS client 2021 - #75 by Moisie

Thanks.

Hi @Moisie ,

thank you very much for that hint. In deed your version runs fine in the debugger, but the problem I described with uroni’s version remains the same. After installation the icon of the application stays white for quite some time (1-2 minutes), then finally turns red. But in both cases the context menu only shows the options mentioned above (“Access Backups”, “About…”, “Status” and “Uninstall”). Your previous version worked better :slight_smile:

Bye

So, I’ll not update the top post then… Thanks for testing!

Hi @Talkabout

Ah - understood - thanks for clarifying. FWIW, I’ve reproduced the same issue with my build on macOS 10.14 - but it behaves ‘normally’ on macOS 10.12.

Hi @Moisie ,

any chance you can fix this problem?

Thanks!

Hi @Talkabout

Sorry for the delay on this. If you’re happy to keep testing a few builds, then I’m happy to try and narrow it down further! It might take a little while, but I’m happy to persist if you are…

Perhaps we should take this into DMs, rather than contaminate this thread further?

I have installed the “MacOS client 2021 - #75 by Moisie” (from the link above) and configured /Users as a backupdir. (Using sudo to run the urbackupclientctl command).

Are there other directories that are recommended to backup on the Mac version?

This iMac is running Catalina (10.15.7).

Thanks

I must have done something wrong. The backup has failed with the following logged on the server:

Error while listing files in folder "/Users/admin/Desktop". User may not have permissions to access this folder. Errno is 1

Is there an installation guide that I’ve missed?

Thanks,

Hello @fswasey

Thanks for giving this a try - please feed back with your experiences on the macOS client!

The /Users directory is likely the most important for any individual; however, you might consider backing up the entire system drive in order to catch your applications and their supporting data too.

Even though you won’t be able to fully restore a working system drive from such a backup, it can be a useful reference for - e.g. - reverting to a previous version of an application, should an update break functionality.

Hello @fswasey

This isn’t currently noted anywhere, but you likely need to grant the Urbackup application Full Disk Access:

Go into System Preferences > Security & Privacy > Privacy, and select Full Disk Access in the column on the left-hand side. Then drag the Urbackup application into the table on the right-hand side, and ensure it’s ticked. You might need to unlock the padlock at the bottom of the screen for this.

If that doesn’t help, please let us know!

AHA! Yes, that was exactly it. I found that the UrBackup Client.app was in the list (but not checked). After checking it and rebooting the iMac, a full backup is running and moving data (it failed in just building the list before).

Thanks!
~ Frank

I am again getting errors that indicate the UrBackup client does not really have full disk access. However; I have told it to protect /Applications and two accounts in /Users, but it is getting upset about “Error while listing files in folder “/System/Volumes/Data/private/var/db/ConfigurationProfiles”. User may not have permissions to access this folder. Errno is 0”

I have confirmed that UrBackupClient still has Full Disk Access.

I am confused about why UrBackupClient is down that path to begin with. I can’t see any reason for it in the other messages that came out (about symlinks going off to places and needing to be verified).

What information can I provide to help with this?

~ Frank

Hi Frank:

Thanks for the feedback. The error you’re seeing is different from the ‘Full Disk Access’ Privacy permission, and is an area I’m working on at the moment - better removal of unreadable (or unbackupable, or unrestorable) system files - so in due course, this error will be handled better.

As to why the client is going down this path: I suspect you may have an alias to Macintosh HD somewhere inside /Applications or your two user accounts, which will lead the client here. The client will then be looking inside the folder to see what files it has, and whether they should be included in the backup - at which point the OS doesn’t give it permission.

Assuming you can’t easily find the alias to Macintosh HD in those places, you might want to try adding /System to the list of excluded folders, in the hope that the client will be prevented from delving too deep inside there; TBH I don’t know if this will work or not - but it’s easy to try!

HTH.