Wednesday, July 27, 2011

Lion, Time Machine and AFP feature bits.

Update2: SMB should be supported in _r2 version. Probably not a very good idea unless your network connection is solid. Also remember that you can't restore the whole system from a TM image on an SMB share.. at least not from OS X boot disk.
Update1: Please try updating your NAS firmware first; most manufacturers will be releasing updates that make their devices Lion-compatible in the near future.
These new flags made mandatory in Lion help with AFP session recovery after network connection loss, so you will be at a higher risk of data corruption when using this workaround over spotty WiFi.

'The network backup disk does not support the required AFP features' message means that
Lion's backupd now requires 'TM Lock Stealing' and 'Server Reply Cache' AFP features on all TM destinations.

TMShowUnsupportedNetworkVolumes workaround affects the UI but has no effect on actual daemon behaviour.
So, seeing as how I'm not going to buy a Time Capsule any time soon, an idea was born:
What if we could make backupd work with those unsupported volumes and unleash any potentially data-munching-monster-ish bugs this unsupportedness shall surely entail? Sounds like a plan!

tldr: Download, unzip and run the script.

^^ A dylib that fakes those new shiny AFP feature bits for your old musty half-dead early 20th century NAS-o-saurus.

Disclaimer: Use at your own risk; data-corru¾*{5Ë# may occur!

Boring tech details: just read the source.

96 comments:

Björn said...

hey, great to see you're working on that. but every time I run the script, "cannot execute binary file" appears. can you please help me. thanks for all!

msft.guy said...

@Björn: Please run the script in debug mode (bash -x ~/Downloads/backupd_anyafp/install.sh) and copy the output to http://pastie.org/, then post a link here..

Björn said...

YEEEHAAAAAA! I got it!!! Thanks so much!!! what a great day. thanks again ;) !!!!!

denis said...

it works great!!!

Anonymous said...

Confirm from me too.. Works just fine. Now I can make timemachine backups from Lion to my Lacie Networkspace.

Also thanks goes to Google to rank this page so high, so soon :)

eli said...

I have a Terastation. I ran your script, but I am still not able to mount the Buffalo Terastation via AFP in Lion.

Any suggestions? Am I doing something wrong.

Thank you Very much.

msft.guy said...

@eli: Afaik there were two problems with Lion compat. The first was SMB1 support and 'DHCAST128' auth were disabled. Read here (http://charlestendell.com/os-x-lion-afp-nas-connection-error-fix/) on how to reenable them.
My post only pertains to the specific problem where you already _can_ mount your network drive via AFP or SMB, but Time Machine displays an error 'The network backup disk does not support the required AFP features'.
Hope this helps.

mattpreston said...

Glad I found your post, however I'm struggling to run the script? I ran this in terminal:

bash -x ~/Downloads/backupd_anyafp/install.sh

made sure all the paths were okay but then got your about about message..

Callum Catterall said...

Hello, also didn't work for me - http://pastie.org/2312673

All I did was drag the script to Terminal? Is that right?

msft.guy said...

@mattpreston: "but then got your about about message.." - can you elaborate on that? Or paste some Terminal output?..

@TechWorldTips: Script ran fine. Now start Console, filter for backup, then click 'Back Up Now' in TM menu; you should get some logs; copy them to pastie.org as well.
Were you getting 'The network backup disk does not support the required AFP features' message or something else?

woodstok said...

Just to clarify, should this work when using TM via SMB ? Doesn't work for me although script installs fine and did a reboot.

msft.guy said...

@woodstok: New version will work with SMB.. at least it works for me ;)
(Updated the post)
Post the Console log if it doesn't..

woodstok said...

Installed the current version and this makes a difference, but still no luck. See http://pastie.org/2313113. Am trying to backup to a previous image created under Snow Leopard (then and now via SMB).

msft.guy said...

@woodstok: the dylib works as expected, but TM can't create new images over SMB, and that's what it attempts to do according to the log.
Please try to mount the volume 'owl.sparsebundle' manually to verify it works and is writable.

woodstok said...

@mfst.guy, problem solved :-) TM now wanted the image at the top level of the mount point. Completed 11GB backup over WiFi. Works perfectly incld. restore. Can highly recomend this hack. Briliant, and thanks for sharing this!

Callum Catterall said...

@mfst.guy Hi, I've got it to backup, done a 58GB backup, and some others after it, can't seem to enter Time Machine, just says connecting to backup volume and then it goes?

Callum Catterall said...

@mfst.guy this is the console log, enter time machine shows up on my MacBook Pro, not the iMac - http://pastie.org/2317046

msft.guy said...

@Callum Catterall: Not sure what's wrong there... no errors and the backup volume seems to have been mounted OK. I think Finder does the TM UI, so no idea what goes wrong after backupd mounts the image; and I can't reproduce that myself (TM UI works for me over SMB), so good luck figuring this one out :/

Callum Catterall said...

@mfst.guy Nevermind, thanks for this though :)

RODVAL said...

Everything is working fine, but I cannot enter Time Machine to navigate through the hourly backups created. However I can see backups are done automatically. What could be wrong?

RODVAL said...

Here is the results... http://pastie.org/2342161

Ekynos said...

Works like a charm with my Buffalo Link Station WXL798. Thank you very much!

Woife said...

Perfect!!!

Works on a SMB-Share on WHS 2011.
Thanks alot.

Regards from Munich, Germany

Wolfgang

woodstok said...

Hi mfst.guy, backups and browsing TM have been working great. Backups do now (using SMB) take a lot longer than under Snow Leopard. There is an indexing-the-backup phase which I don't recall to have seen under Snow Loepard. This take a lot of time. Do you know if this is a Lion feature, or could this be a side effect of your sourcery ?

alexndr said...

How do I rollback the changes that the script makes?

Unknown said...

You make my day! THANK YOU! :)

mixmax said...

@msft.guy
Trying to recover media from my iPhone2G 3.1.3 via SHH with RAMdisk method. I can't mount user data partition (getting invalid argument error) and can't fix it via fsck - see below:

-sh-4.0# fsck_hfs -r /dev/disk0s2
** /dev/rdisk0s2
** Checking Non-journaled HFS Plus volume.
** Detected a case-sensitive catalog.
** Checking Extents Overflow file.
** Checking Catalog file.
** Rebuilding Catalog B-tree.
** The volume Data could not be repaired.
-sh-4.0# fsck_hfs -p /dev/disk0s2
Invalid node structure
(4, 1582)

Any chance to access /dev/disk0s2 or dump raw contents of it via USB to host PC for further processing and recovery? Any other suggestions? %(

Blinde Kuh said...

You made a small error in the install.sh script. Nothing serious.

It should be:

sudo killall backupd 2>&1 >/dev/null

instead of

sudo killall backupd 2&>1 >/dev/null

R D said...

Cannot thank you enough for this work. I went around and around for *weeks* with numerous D-Link support forums, and command line AFP_DISABLED_UAMS prefs before trying your script to success. My DNS-323 now works with OSX Lion and Time Machine. Thanks again!

medic said...

Quick question concerning your disclaimer:

"Also remember that you can't restore the whole system from a TM image on an SMB share.. at least not from an OS X boot disk."

In case I want to restore it...how do it do it? Do I copy the TM image on a usb drive from my NAS and take it up from there or what would be the best way?

Thks

Anonymous said...

could you help me with this one please?
http://pastie.org/2924446
Problem:"cannot execute binary fie"

apes said...

i think i love you. a while back i found out how to enable unsupported network disks and create a sparsebundle but it never would run the backup. it works now in Lion thanks to your script. i can breath now, so can my business... THANKS!

shortpitch said...

worked great on my MacMini with a DNS-323. Thanks!

albis said...
This comment has been removed by the author.
albis said...

Thanks thanks thanks thanks! I am finally able to use time machine to backup my macbook air and cisco x3000

seath2008 said...

On a BA4000 I keep getting this error from TM "The network backup disk does not support the required AFP features"

Any ideas?
Thanks!

seath2008 said...

wrong alert. everything works fine. I got the chicken answer first and I thought I was ok with installation (I typed the phrase with Capitals and Lows) just as it appeared and not in low letters
Anyway, after days of trials and errors and looking to install linux in BA it worked without all these tricks. Script was perfect

TechNazgul said...

Another thumbs up here. In my case I was mounting a Windows Server 2008 share to a MBP 13" via wireless and it worked fine.

Just to provide one other point to check if anyone is having problems... make sure you are only mounting via SMB, not NFS, which was how I started and that will not work. These were the first part of the instructions I followed to make the sparsebundle on the network share if anyone else needs them:

http://www.makeuseof.com/tag/backup-mac-homemade-time-capsule/

Thank you!

Mark said...

thank you! it worked great (once I had sorted out my administrator rights on my mbp). Buffalo Linkstation HS-DH500GL working with Time Machine & Lion. thanks again.

wuotr said...

So if I understand this correctly I have to run this script on my Macbook, which will enable me to connect with an SMB share? And then I'll have to create a .sparsebundle? Thanks in advance ;-)

msft.guy said...

@wuotr: just find an article describing how to set up TM to SMB in SL, now you can do the same stuff but in Lion, using this hack. I wouldn't know setup details anyway, since I already had a backup before my 10.6->10.7 upgrade.

wuotr said...

@msft.guy: Thanks for the info ;-)

One more (little) question though: What does the script actually do? Does it force Lion to use the DHCAST128 protocol instead of DHX2 when connecting to the SMB? Because I looked into the sourcecode, but I can't figure out how it works exactly :-S.

And can it be "undone"?

Thanks in advance (again).

msft.guy said...

@wuotr: To uninstall, go to /System/Library/LaunchDaemons/ and move com.apple.backupd.plist.bak to com.apple.backupd.plist.
Then you can remove the dylib from /usr/local/lib/..
It works by intercepting backupd's calls to fsctl() and returning stuff that makes backupd think AFP features are supported by the volume.

wuotr said...

@msft.guy: Allright! Thanks man ;-)

Steve said...

Witty install script... Time Machine working on my 'unsupported' SMB network drive for the first time since Lion. Thanks!

Alexander said...

It didn't work for me either. Tried to do backup - got the message "The network backup disk does not support the required AFP features." Here is the link http://pastie.org/2312673. Thanks much for your help

msft.guy said...

@Alexander: reboot, try to back up again, then start Console, select 'All Messages', type 'backup' into the Filter field, select all and post that too.

Alexander said...

Thanks for suggestions. After reboot and attempt to backup same message "The network backup disk does not support the required AFP features.

here is the Console "backup" results link http://pastie.org/3312446

msft.guy said...

@Alexander: fascinating.. looks like the dylib isn't getting loaded.

Copy following commands to Textedit/Terminal (don't type them manually if possible) to preserve line breaks and prevent typos

Try those commands (and pastie the output):
cat /System/Library/LaunchDaemons/com.apple.backupd.plist| grep -2 DYLD
cat /System/Library/LaunchDaemons/com.apple.backupd.plist| grep -1 Program
DYLD_INSERT_LIBRARIES=/usr/local/lib/libbackupd_anyfs.dylib /System/Library/CoreServices/backupd

Additionally,
Press 'Clear display' in Console, execute this command:
sudo bash -c "launchctl unload /System/Library/LaunchDaemons/com.apple.backupd.plist; launchctl load /System/Library/LaunchDaemons/com.apple.backupd.plist; launchctl start com.apple.backupd"
and copy the stuff that gets logged in Console.

Alexander said...

here is link to first set of commands http://pastie.org/3312626

console: http://pastie.org/3312653

msft.guy said...

@Alexander: Install didn't modify the files it was supposed to modify - make sure you're an admin etc.
e.g.:
sudo cp /Users/Callum/Downloads/backupd_anyafp/com.apple.backupd.plist /System/Library/LaunchDaemons/com.apple.backupd.plist

I can't figure out why things like 'sudo cp file dest' don't work on your machine, so you'll have to figure this out for yourself, sorry ;/

Alexander said...

Well, I followed your last suggestion, re-installed. Now, when I start TM it is sitting forever on "looking for backup disk". Sparsebundle is available and can be mounted manually, but that doesn't help... Any ideas? Thanks much.

msft.guy said...

@Alexander: Well, now it seems backupd crashes because you've changed the plist but didn't install the dylib.
Try these now:

sudo mkdir -p /usr/local/lib/
sudo cp ~/Downloads/backupd_anyafp/libbackupd_anyfs.dylib /usr/local/lib/

Alexander said...

Thank you SOOOO MUCH!!!! Backup started and going, probably will take some time... It's backing up to Buffalo LS-WTGL/R1-V3.

Anonymous said...

Hello
on my iMac with 10.7.2 the directory /usr/local/lib does not exist! instead there is the directory /usr/lib

echo puts out to miss a few nuts and bolts ;-)
So what is missing?

msft.guy said...

@54fce6ca-51be-11e1-b694-000bcdcb5194: "nuts and bolts" error just means install script can't find other files from the zip; they all should be in the same directory after extraction. Care to post the verbose log? (run 'bash -x ~/Downloads/backupd_anyafp/install.sh')

Anonymous said...

@msft.guy
thank you
I had find it out on myself also ;-) i have to fill in the base directory manually and then "run" the script command per command.
And its works with my Medion Life NAS ;-)
Thank you much.
:-Daniel

littlegti said...

Thank you so much for this. Just upgraded to Lion after testing everything else but TM. Not sure what I was thinking.

Anonymous said...

Use this to create sparse bundle on unsupported drive:

http://code.stephenmorley.org/articles/time-machine-on-a-network-drive/

Currently have 150 gb tm backup on a usb drive attached to a linksys wrt610n! Thanks!

Anonymous said...
This comment has been removed by the author.
Anonymous said...

Yeah, sooo f*cking great, even in 10.8! Thanks!

Papa Fink said...

Thanks for this, it is great. However, my Mac drive crashed and now have to restore from my smb backup on Win machine. How do I do it? Can't figure it out for the life of me.

snekiam said...
This comment has been removed by the author.
snekiam said...

Can somebody help me with this error message?

bash -x /Users/MYUSERNAME/Downloads/backupd_anyafp/install.sh
++ dirname /Users/MYUSERNAME/Downloads/backupd_anyafp/install.sh'
usage: dirname path
+ BASE=
+ check_my_stuff
+ test -f /libbackupd_anyfs.dylib -a -f /com.apple.backupd.plist
+ echo 'Seem to be missing a few nuts and bolts, ABORT, ABORT!!'
Seem to be missing a few nuts and bolts, ABORT, ABORT!!
+ exit 9001

Thank You!
-Snekiam

shound said...

great solution!!! finally lacie network work with TM!
thk a lot
(lion 10.7)

jus

wilcodis said...

Hey msft.guy, great script. It's just that TM fails to create the sparsebundle. When it first starts, I can see it creates a .tmp.sparsebundle but then it fails with error 45. See http://pastie.org/3903813. Any thoughts? Thanks!

Unknown said...

@msft.guy,

I am having the same issues it not letting me back up due to the error of the disk not being afp. I have ran the your script and i also did the manual move of the files in your zip files to the locations you specified. and I am still getting the error. I have my NFS server mounted under the NFS share. any help will be most appreciated.

Unknown said...

@msft.guy,

Thank you for the great script I got it to work after I manually created the sparsbundle using the hdiutil command and now it is working great.

THANK YOU, THANK YOU, THANK YOU!!!!!

osxwouteer said...

I still get the message saying the drive doesn't support the new afs encryption. is there anything I could do other than buying a time machine drive?

Deron said...

It worked very well for me for about 2 weeks, but then the 'integrity check' by Time Machine failed. I had to start over. It's working fine again, but now I'm not so sure I can trust this solution. Apple should make this easier. I don't want to plug in a USB drive to my laptop.

Shawn E. said...

Looks like another step for Mountain Lion is needed to make it work. The file updates. (com.apple.backupd), but Time Machine still won't see the network drive using SMB.

shound said...

your process was really great to use lacie with lion! just yesterday I upgrade to mountain lion...TM didn'tsee the smb NAS, so I repeat the procedure again, now it see the lacie but say me that the file sparsebundle...is alreadu in use!
what can I do?
thank so much for help

Unknown said...

I found this article very helpful, iPhone hacking is major issue now a day, I've got it to backup, done a 58GB backup, and some others after it, can't seem to enter Time Machine. more that there is an indexing-the-backup phase which I don't recall to have seen under Snow Loepard. This take a lot of time. you have done good job. Now I'm using Watch Phone but I want to buy iPhone, That's is main reason to search about iPhone.

halman said...

Yes, I have found and error, the same mistake I have made in my version of whatsapp for pc. but nothing bad. Congrats!

hallsarah204@gmail.com said...

My congratulates on your debut! I like this educational article!It's indeed very helpful for my research! But I'm still using term paper writing service when I need to get my academic work done in time!

Unknown said...

This is a good site that provides diverse programming information. I have find out new information about cracking especially for the iphone. I will bookmark this site so that I can visit it occasionally to read new programming and computational information. For more creative articles, feel free to hire our Confidential Case Study Writers.

Unknown said...

Works very well and I also found out about appaddict repo which is basically an app that lets you download paid apps for free!

writing tips said...

Participants will get the certificate provided 6 ECTS credits for passing the internship. Expenditures for meals, study trip to Soviet bunker in Ligatne and two social evenings will be covered organizers.
dissertation Writing Services

Anonymous said...

My life was falling apart, I was being cheated and abused, I had to know the truth and needed proof. i saw a recommendation about a private investigator worldcyberhackers@gmail.com by a friend. i contacted them and they took care of my needs. they hacked her iphone and gave me all information in her facebook,instagram, Whatsapp, twitter and email account. I got all I wanted as proof . I am glad i had a proven truth she was cheating . I recommend them if you need help

BroddyAdams said...

Hello, i think that i saw you visited my website so i came to “return the favor”.I'm trying to find things to enhance my website!I suppose its ok to use some of your ideas!!
solve afp problems

John Oneal said...

Avast Customer Service
Norton Customer Service
Bitdefender Phone Number
McAfee Customer Service Number

Marica Nadarish said...

My boyfriend has been cheating on me for months and I had no idea, I searched all over to get help spying his phone but I didn't. I finally found a reliable hacker to help and I strongly recommend (worldcyberhackers) to anyone who needs help spying their partner. I was able to access his Iphone contents without touching and It literally worked without traces. Don't hesitate to message on Gmail(worldcyberhackers) or WhatsApp: +12678773020 if you need help with hacking and spying

Smith678 said...

Apple replaced her battery also. It won't charge you to replace your phone's battery if it is under warranty. To get more detailed info on prevent iphone overheating, visit on hyperlinked site.

John Honer said...

I think I love you. A while back, I found out how to enable unsupported network disks and create a sparse bundle, but it never would run the backup. It works now in Lion thanks to your script. I can breathe now, so can my business. Literature Dissertation

John Wick said...

I love iPhones. Apple company is the best in the world. Click the links down below to get more info.
PixelYourSite Pro
Woocommerce Stripe ACH Gateway
Brizy Pro
WPForms Pro Nulled
Pinterest Automatic Pin WordPress Plugin
Divi Overlays
Live Chat Unlimited

Key Activator said...

I like your post plz keep it up providing software or
Activation Code
License Key.
Activation Key
Thanks Bro

totoodo said...

Totoodo is one of top company which has many iphone 6 service center in Bangalore, Chennai, Hyderabad. We take care of all the issues pertaining to iphone 6. We at iphone 6 service center pick your phone and understand the problem you facing and resolve the issue with quality check and deliver back to you on time. Our team of professionals are highly trained and understand the value of your phone. Totoodo has been awarded as the best iphone 6 service center in Bangalore, Chennai, Hyderabad.
iPhone service center
iPhone 6 service center
iPhone 6 Battery Replacement
iphone screen repair
Apple iphone Service Center in Koramangala
Oneplus Service Center in Hsr Layout
Oppo Service Center in Bellandur

sara mohamed said...

شركة تنظيف منازل بالجبيل
شركات تنظيف منازل بالجبيل
ارقام شركات تنظيف منازل بالجبيل
اسعار شركات تنظيف منازل بالجبيل
شركة تركيب طارد الحمام بالجبيل
شركة تنظيف مجالس بالجبيل
شركة تنظيف سجاد بالجبيل
شركةغسيل سجاد بالجبيل
شركة تنظيف فلل بالجبيل
شركة تنظيف بالجبيل
شركة تنظيف خزانات بالجبيل
شركة مكافحة صراصير بالجبيل
شركات تنظيف بالجبيل
ارخص شركة تنظيف بالجبيل
رقم شركة تنظيف بالجبيل
شركة نظافة بالجبيل
تنظيف بالجبيل
ارقام شركات تنظيف بالجبيل
تنظيف بالجبيل رخيص
https://almthaly-dammam.com

Pro Activator said...

I like your post plz keep it up providing software or
Adobe Photoshop CC Crack
Power ISO Serial Key

Download Files said...

This is amazing bro
Z3X Samsung Tool Pro
Adobe Photoshop CC

jason said...

Wave Pad Sound Editor 11.08 Crack 2021 is a complete-featured expert audio as well as songs editor for Mac 2020. It enables the consumer document and edits songs, tone of voice, and additional sound recordings. The range of songs appears can enhance by this tool. wavepad sound editor crack

AJ said...

Jaipur to Hanumangarh taxi

Jonny Sin said...

iMazing Crack Excellent piece of work, and I am in wonder how you manage all of these content and his entry. I would like to say you have superb capabilities related to your work, and lastly, please keep it up because I am looking for the more.

SOPHIE lily said...

The Vidmate app is a three-in-one utility for playing, downloading, and converting videos. It works with hundreds of streaming websites to provide access to a massive content library for free viewing.

Easy access to HD videos
Vidmate is an app that enables free and quick content downloads from video streaming sites all over the Internet.
Vidmate is primarily a video downloader that offers easy-to-use tools for browsing and downloading media. It covers streaming sites such as Vevo and YouTube, as well as social media.

The UI is quite straightforward. It shows you supported websites for you to choose and find and download the content you want with a single click.

download vidmate apk
Techisq free app download
free mobile app download
9app software
Vidmate latest version
leaked movies download
latest version vidmate
free video vidmate
Job apps work from home jobs
Report: Your phone number reveals more personal info than your name
According to a recent New York Times article, your phone number has loads of personal information attached to it. Quite often, websites and apps ask us for our phone number when logging in or creating an account.


freeactivationkey said...

I like your all post. You have done really good work. Thank you for the information you provide, it helped me a lot. I hope to have many more entries or so from you.
QuickBooks Crack
ZWCAD Crack
Topaz DeNoise AI Crack
Stardock WindowBlinds Crack
Enscape 3D Crack
Pin on JetBrains CLion Crack
Change MAC Address Crack
MATLAB Crack
SpyHunter Crack
Prism Video Converter Crack

crackedtopc.com said...

Your post is very unique and reliable information for all readers so write more on same topic and share with us your info.

Hitman Pro Crack
Vectric Aspire Crack
FinePrint Crack
PaperScan Professional Crack
Euro Truck Simulator Crack
SoftPerfect WiFi Guard Crack
Extreme Picture Finder Crack
Internet Download Accelerator Crack
CleanMyMac X Crack
RazorSQL Crack