Time Machine works for a while, but then throws “Error 45”

I’ve set up my MacBook Pro’s Time Machine to point to my EX4100, and the pattern is that it works for a few days, but eventually returns “Error 45”:

The backup disk image “/Volumes/.timemachine/(snip)/TimeMachineBackup/Steve’s MacBook Pro.backupbundle” could not be accessed (error 45).

This is a repeating pattern. (Eventually, I seem to get it started again. But the “fix” inevitably seems to be temporary.)

(Yes, I’ve turned on Time Machine Backup within the EX4100’s web interface.)

One theory I had was that Time Machine was losing the login credentials for the EX4100. (My “fixes” seem to entail unmounting the drive, and (re)entering my login credentials via Finder’s “Connect As” dialog box.)

So I tried this command (via Terminal):

sudo tmutil setdestination afp://user_name:pw@WDMyCloudEX4100._afpovertcp._tcp.local./TimeMachineBackup/

(Where I used the EX4100’s admin user name and pw for user_name:pw. This is per tmutil Man Page - macOS - SS64.com)

Running tmutil destinationinfo returns:

ssickels@Steves-MacBook-Pro ~ % sudo tmutil destinationinfo
Name : TimeMachineBackup
Kind : Network
URL  : afp://;AUTH=No%20User%20Authent@WDMyCloudEX4100._afpovertcp._tcp.local./TimeMachineBackup

(I don’t know enough about tmutil to know if that’s the “correct” output, given what I’m trying to achieve. Or if “;AUTH=No%20User%20Authent” means that my attempt to include the user name and password via the setdestination command didn’t actually work.)

But nonetheless, and once again, after things worked for a day or so, I’m back to “Error 45.”

Any ideas??

– Steve

sudo tmutil setdestination afp://user_name:pw@WDMyCloudEX4100_AFP_TimeMachineBackup._afpovertcp._tcp.local./TimeMachineBackup

I think you missing “_AFP_TimeMachineBackup”

@jebusx – Thanks! But that doesn’t seem to work. I get:

zsh: no such file or directory: @WDMyCloudEX4100_AFP_TimeMachineBackup._afpovertcp._tcp.local./TimeMachineBackup

Any other thoughts/suggestions?

try this

sudo tmutil setdestination -ap afp://username:password@DeviceName_AFP_TimeMachineBackup._afpovertcp._tcp.local./TimeMachineBackup

For Mac OS X 10.15.x in Security & Privacy “Privace” , “Full Disk Access”, add "Terminal.app

@jebusx

Many thanks for the follow-up! I tried:

sudo tmutil setdestination -ap afp://user_name@WDMyCloudEX4100_AFP_TimeMachineBackup._afpovertcp._tcp.local./TimeMachineBackup

And get this:

Password:
Destination password:
Failed to open session. (error 64)
The backup destination could not be added.

Google is not much help on “error 64.”

Steve

Setting, General, Mac Backup, Time Machine “ON”, Configure>>, Select a share “Pick a folder”, SAVE

“Pick a folder” = Public or TimeMachineBackup or any folder you like to use a TMB.
Then from the command line change “./TimeMachineBakcup” to “./NameofYourFolder”
(error 64) mean the folder name does not match with the share folder name from your device setting.

From here you could use the command line or use Mac OS X TimeMachine setting from the System Preferences

Hope that help.

@jebusx

Again, I really appreciate all the time you’re putting into helping me out – thanks!

I checked the spelling of the folder I’ve picked under the Configure >> “Pick a folder” dialog, and it’s just TimeMachineBackup. So it doesn’t look like that’s the issue. Also, when I issue the following command (without _AFP_TimeMachineBackup), it seems to work. At least, it shows a successful mounting:

ssickels@Steves-MacBook-Pro ~ % sudo tmutil setdestination -ap afp://user_name@WDMyCloudEX4100._afpovertcp._tcp.local./TimeMachineBackup
Destination password: 
ssickels@Steves-MacBook-Pro ~ % tmutil destinationinfo                                                                              
====================================================
Name          : TimeMachineBackup
Kind          : Network
URL           : afp://admin@WDMyCloudEX4100._afpovertcp._tcp.local./TimeMachineBackup
Mount Point   : /Volumes/.timemachine/WDMyCloudEX4100._afpovertcp._tcp.local./(alpha-numeric string)/TimeMachineBackup
ID            : (different alpha-numeric string)

However, when I issue the command with _AFP_TimeMachineBackup in the host address, I get error 64:

ssickels@Steves-MacBook-Pro ~ % sudo tmutil setdestination -ap afp://user_name@WDMyCloudEX4100_AFP_TimeMachineBackup._afpovertcp._tcp.local./TimeMachineBackup
Password:
Destination password:
Failed to open session. (error 64)
The backup destination could not be added.

So it seems (?) that there’s a problem with the host address in afp://user@host/share, vs. with the /share.

(But as I mentioned before, even though the first command (without _AFP_TimeMachineBackup in the host address) seems to work, TM inevitably fails with “Error 45.”)

Anyway, unless you (or others) have further suggestions, I think I’m going to drop trying to use TM with my WD EX4100, and will switch to a different backup solution, like Acronis True Image. Thanks again!