Backup 3: Problem solved...

Started by walinskydotcom, November 24, 2005, 08:38:39 PM

Previous topic - Next topic

walinskydotcom

First I'd like to thank you all for your contributions.
My setup:
Fedora Core 4 / Apache/2.0.53
Mac OS X 10.4.3 / Backup 3.0.1
I managed to 'just' patch/compile the mod_dav and mod_dav_fs dso's without compiling Apache, so I'm still having a 'stock' Apache.

Having played around with lynx for some time (using both a trial and a 'real' .Mac account) I found the following;

Backup3 sends (until now at my server) 2 different xml-queries to .mac:
1:
<?xml version="1.0"?>
<methodCall>
<methodName>accountInfo</methodName>
<params>
<param>
<value><string>username</string></value>
</param>
<param>
<value><string>password</string></value>
</param>
<param>
<value>
<string>daysLeftUntilExpiration</string>
</value>
</param>
</params>
</methodCall>

...which could be answered with:
<?xml version='1.0'?>
<methodResponse><params><param><value><struct>
<member><name>daysLeftUntilExpiration</name><value><int >350</int></value></member>
</struct></value></param></params></methodResponse>

..ehrm... well.. at least I thought 350 would make a nice number Laughing

2:
<?xml version="1.0"?>
<methodCall>
<methodName>accountInfo</methodName>
<params>
<param>
<value><string>username</string></value>
</param>
<param>
<value><string>password</string></value>
</param>
<param>
<value>
<string>servicesAvailable</string>
</value>
</param>
</params>
</methodCall>

Backup loves the following answer...
<?xml version='1.0'?>
<methodResponse><params><param><value><struct>
<member><name>servicesAvailable</name><value><array>
<value><string>iDisk</string></value>
<value><string>iSync</string></value>
<value><string>Backup</string></value>
<value><string>iChatEncryption</string></value>
<value><string>Email</string></value>
<value><string>WebHosting</string></value>
</array></value></member>
</struct></value></param></params></methodResponse>

You'll find a Quick 'nDirty Perl script attached that does the job;
Backup expects to find it at https://www.mac.com/WebObjects/Info.woa/wa/XMLRPC" target="_blank">https://www.mac.com/WebObjects/Info.woa/wa/XMLRPC
so make sure you have right permissions on both the perl-file as on the XMLRPC dir

rgrds,

Walinsky

syepes

ok now your script is responding ok, i have a question is is necesary to patch the WebDAV for Backup to Work?
when i try to make a backup it gets cancelled (Automatically) any one know why?

walinskydotcom

I'm not quite sure if you need to make the webdav patch for making backup work; it isn't that much work though...
Have you checked if your certificates on both idisk.mac.com and www.mac.com are ok?
You do need both! (which means you need at least 2 ip-addresses).

Attached you'll find a dotMacPreferencesPaneMessage script (which should reside in your https://www.mac.com/WebObjects/Info.woa/wa/DynamicUI/" target="_blank">https://www.mac.com/WebObjects/Info.woa/wa/DynamicUI/ (executable et al)), which makes your dotMac preferences pane look much better.
It even verifies usernames/passwords against the digest database.

cadre

Walinsky, you are both a gentlemen and a scholar.

Got everything working included full Backup 3 authorization and control over the dotMac preferences pane.

My setup - OpenBSD 2.8, Apache 1.3.29, WebDav 1.0.3-1.3.6 (patched).

walinskydotcom

I don't know if this problem exists on Apache 1.3.*, but my restore function kinda barfed on me;
When trying to restore a backup, the program complained about not being able to find the correct backup; manually pointing to the right backup worked though.
Studying the logs learned me that apache was throwing a 301 (Moved Permanently) to the client.

In httpd.conf there's Browsermatch directives handling webdav redirects;
I just needed adding/changing:

BrowserMatch "Microsoft Data Access Internet Publishing Provider" redirect-carefully
BrowserMatch "^WebDrive" redirect-carefully
# Edited by walinsky; added WebDAVFS/1.3* clients
BrowserMatch "^WebDAVFS/1.[0123]" redirect-carefully
# This one added by walinsky; for handling Apple's Backup client
BrowserMatch "^DotMacKit/1.[012]" redirect-carefully
# And this one for iCal
BrowserMatch "^DAVKit/" redirect-carefully
BrowserMatch "^gnome-vfs" redirect-carefully

Works like a charm...

myneid

maybe i missed teh boat here but i notice a couple references to an attatched file that i dont see anymore
does anybody still have these?

walinskydotcom

Quote from: myneid on May 30, 2006, 12:08:16 PM
maybe i missed teh boat here but i notice a couple references to an attatched file that i dont see anymore
does anybody still have these?
I mirror all my scripts at my homepage