Tuesday, June 28, 2011

DeployStudio freeze users home directories

I've had a chance to check out the new DeployStudio "Freeze home directories content (restore at reboot)" feature of rc127. It's a check box in the Configuration Task of a workflow.

The script that runs at first boot checks for any existing backups. If none are found, it uses ditto (ditto --rsrc ) to create a copy of each home directory from /Users to /private/dss_homedirs_ref/.

If there is an existing backup of a user in /private/dss_homedirs_ref/, the script uses rsync ( rsync -av --delete ) to restore the home folder. A word of caution here; If there is an existing backup and changes have been made to the user's home directory, the rsync command will delete the files that don't exist in the backup after a reboot. This is great for a lab Mac, where you want the same home folder every time the machine reboots. Its not so great for a faculty machine, be careful and test!

By default, the Shared folder is not included in the backup and restore process.

Check out the actual script here: http://pastie.textmate.org/2141011

2 comments:

Unknown said...

is there anyway to un-freeze this ?

Rusty Myers said...

Pinak, I've not used the freeze homes before, and it's been a while since I reviewed it.

I would say that you can disable this script from running at login by removing the /Library/LaunchDaemon/com.deploystudio.freezeHomedirs.plist. Once you do that, you should be able to manually move the home folders from /private/dss_homedirs_ref back into the /Users folder. Be sure to chown and chmod to the correct user permissions before testing the homes, otherwise you'll get errors.

Hope that helps!