Installing client on Mac OS 10.14 / Mojave fails

I have the following message in the installer logs when I try to install a client which I just downloaded from the server:

2018-11-18 03:03:29+01 lepiote installd[1221]: PackageKit: Install Failed: Error Domain=PKInstallErrorDomain Code=112 “An error occurred while running scripts from the package “final.pkg”.” UserInfo={NSFilePath=./postinstall, NSURL=file://localhost/var/folders/x5/s9ksckd50nnggmt1l9n_vj_m0000gn/T/selfgz160717461/final.pkg#output2.pkg, PKInstallPackageIdentifier=org.urbackup.client, NSLocalizedDescription=An error occurred while running scripts from the package “final.pkg”.} {
NSFilePath = “./postinstall”;
NSLocalizedDescription = “An error occurred while running scripts from the package \U201cfinal.pkg\U201d.”;
NSURL = “file://localhost/var/folders/x5/s9ksckd50nnggmt1l9n_vj_m0000gn/T/selfgz160717461/final.pkg#output2.pkg”;
PKInstallPackageIdentifier = “org.urbackup.client”;
}

This didn’t happen on Mac OS 10.13.
As far as I understood, 10.14 restricts access to disk even for root (for example, the find command executed with root privileges fails to scan many directories).
For now I’m stuck with the installation of UrBackup client.
If you need some more info I’d be glad to provide it.
Thanks.

2 Likes

same problem here with last urbackup client and mojave mac os version

I have opened a bug report with Apple. They are requesting log files like instructed here: Install_Logging_Instructions.pdf (502.9 KB)
(to bugreports@urbackup.org )

me too:(

you may try pacifist https://www.charlessoft.com to install it forcibly.
mac os 10.14.4, client 2.3.4, logs attached.

logs.zip (22.4 KB)

thank you

1 Like

Hi,
Does anyone have updates about urbackup client on Mojave? I have tried .pkg and .sh files - installation failed in both cases.

I have added the log files to the Apple issue (/bug report). They haven’t responded yet.

Thank you in advance. Please keep me posted. I will be really appreciated for that.

just checked with with the new mohave 10.14.5 release and install issue still exists, as of now, 10.14.3 is the latest release that works.

First attempt with the UrBackup Client 2.3.4, then I applied the latest updates from Apple today, and re-ran the install with the same result. macOS Mojave 10.14.5

I’m not a programmer (just a system admin) but does it not look like there are some file missing that the install process is calling, “./postinstall” ? :thinking:

2019-05-21 10:51:56+02 computer-name installd[395]: PackageKit: Install Failed: Error Domain=PKInstallErrorDomain Code=112 "An error occurred while running scripts
NSFilePath = “./postinstall”;
NSLocalizedDescription = “An error occurred while running scripts from the package \U201cfinal.pkg\U201d.”;
NSURL = “file:///var/folders/zt/32s5w0qx1435wn137pby5q0h0000gn/T/selfgz138425550/final.pkg#output2.pkg”;
PKInstallPackageIdentifier = “org.urbackup.client”;

install.log (13.0 KB)
system.log (1.7 KB)

Yeah, it’s in your log:

2019-05-21 10:51:55+02 computer-name Installer[1440]: ================================================================================
2019-05-21 10:51:55+02 computer-name Installer[1440]: User picked Standard Install
2019-05-21 10:51:55+02 computer-name Installer[1440]: Choices selected for installation:
2019-05-21 10:51:55+02 computer-name Installer[1440]: Install: “UrBackup Client”
2019-05-21 10:51:55+02 computer-name Installer[1440]: Install: “(null)”
2019-05-21 10:51:55+02 computer-name Installer[1440]: Install: “UrBackup Client”
2019-05-21 10:51:55+02 computer-name Installer[1440]: final.pkg#output.pkg : org.urbackup.client : 2.3.4
2019-05-21 10:51:55+02 computer-name Installer[1440]: Install: “UrBackup Client Tray Icon GUI”
2019-05-21 10:51:55+02 computer-name Installer[1440]: final.pkg#output2.pkg : org.urbackup.client.frontend.pkg : 2.3.4
2019-05-21 10:51:55+02 computer-name Installer[1440]: ================================================================================

So it says it is going to install output.pkg (which contains a file required by postinstall) and output2.pkg. And then:

2019-05-21 10:51:55+02 computer-name installd[395]: PackageKit: ----- Begin install -----
2019-05-21 10:51:55+02 computer-name installd[395]: PackageKit: request=PKInstallRequest <2 packages, destination=/>
2019-05-21 10:51:55+02 computer-name installd[395]: PackageKit: packages=(
“PKLeopardPackage <id=org.urbackup.client, version=2.3.4, url=file:///var/folders/zt/32s5w0qx1435wn137pby5q0h0000gn/T/selfgz138425550/final.pkg#output2.pkg>”,
“PKLeopardPackage <id=org.urbackup.client, version=2.3.4, url=file://localhost/var/folders/zt/32s5w0qx1435wn137pby5q0h0000gn/T/selfgz138425550/final.pkg#output2.pkg>”
)
2019-05-21 10:51:55+02 computer-name installd[395]: PackageKit: Set reponsibility for install to 1440
2019-05-21 10:51:55+02 computer-name installd[395]: PackageKit: Extracting file:///var/folders/zt/32s5w0qx1435wn137pby5q0h0000gn/T/selfgz138425550/final.pkg#output2.pkg (destination=/var/folders/zz/zyxvpxvq6csfxvn_n0000000000000/C/PKInstallSandboxManager/E3048B85-36CC-4A96-AEC1-CD8C4980E63C.activeSandbox/Root/Applications/UrBackup Client.app, uid=0)
2019-05-21 10:51:55+02 computer-name installd[395]: PackageKit: Extracting file://localhost/var/folders/zt/32s5w0qx1435wn137pby5q0h0000gn/T/selfgz138425550/final.pkg#output2.pkg (destination=/var/folders/zz/zyxvpxvq6csfxvn_n0000000000000/C/PKInstallSandboxManager/E3048B85-36CC-4A96-AEC1-CD8C4980E63C.activeSandbox/Root/Applications/UrBackup Client.app, uid=0)

It installs output2.pkg twice.

Ok, so it seems Apple has closed this issue with

This is a package error; It’s failing in the postinstall script; please contact the package author about this issue.

I’ll be removing the macos client and any mention of MacOS support from the urbackup web site for now.

1 Like

:disappointed_relieved:
Researched recently with this result: many commercial backup solutions developers removed MacOS support.

Will solutions be considered with Apple to fix the problem? What are the backup solutions on MacOS that you recommend in the type of urbackup ?

With some hacking, it’s still possible to install the client (just decompress the files contained in the installer package and copy them manually, it’s quite easy).

So even if perfectible, I’d rather have the Mac client present and marked “community supported”. And I’ll be glad to post the workaround somewhere.

How about that Martin?

I’ve been using borgbackup and it’s associated borgmatic script to backup various platforms at work (Mac, Windows and Linux). It’s overall a more “hackable” solution with pros and cons compared to urbackup, but I also like it.

Another issue I’ve had (and fixed) with urbackup for Mac is that the installer sets up it’s var folder inside the application folder.

Given how apple handles authorizations, changing data inside the app folder voids the app’s authorizations to access the disk on every backup. The effects show when the daemon is relaunched (this happens at computer restart or sometimes after sleep).

The simple workaround is to move the var folder to /etc and symlink to it from its original location.

This would have been helpful :wink:

Sure. The hope is that someone takes over maintaining the macos client. The basic step, running https://github.com/uroni/urbackup_backend/blob/dev/create_osx_installer.sh shouldn’t be too hard.
Beyond fixing the issues, what would be nice:

  • Checking if it has full disk access after installation and displaying a screen with instructions otherwise
  • Somehow integrating with APFS snapshots
  • Low priority: Finding out how APFS sparse files work and supporting those

Idk if the /etc area ist the most approriate one. It probably has a better per-applications directory somewhere else (like AppData on Windows).

no solutions yet?

I believe it’s a hard path to take for UrBackup because it’s too platform specific, and it would require a substantial effort to maintain. I’d be better off skipping the “protected” folders of Mac OS (like /bin /sbin and a few others) because they are supposed to be handled by the OS install and update mechanisms (that’s why even Mac OS updates have to boot in a special mode to process those regions, then the Mac boots normally again).

The most important dirs to backup, I think, are /etc /Library and of course /Users. That won’t allow immediate restore of whole systems, but at least we don’t lose user data and configurations.

For Mac applications, the right place to store data is probably in /Library/Application Support/APPNAME/

If it’s user specific data for a given application that would be $HOME/Library/Application Support/APPNAME/

It’s not about system backups. In general, if you backup files without snapshots you have a chance that they are currently undergoing changes and are inconsistent (which makes those backups worthless). Think of the database file of you mail application for example.
If there is a command line tool to create APFS snapshots it’s as simple as creating a snapshot script such as this: https://github.com/uroni/urbackup_backend/blob/2.4.x/linux_snapshot/btrfs_create_filesystem_snapshot