Posted on 12-18-2015 05:25 AM
Does anyone know if there are tools available at the command line that would allow the Migration Assistant process to be automated by scripting? Thanks.
Posted on 12-18-2015 05:36 AM
It wouldn't be too hard... Are you thinking just user accounts? The requirements for that are to make a new account on the machine (dscl), copy the home directory (ditto), and give the appropriate rights (chmod),. I don't know of anyone who has written it already however. I've done it manually many times using rsync instead of ditto to troubleshoot a failed migration. But never scripted it.
Posted on 12-18-2015 06:31 AM
That is correct. All I want is the "Users" folder. If I can find a reliable (Migration Assistant has been pretty good), repeatable (thus the request for a scripting method) of saving the user's data I can nuke and pave a suspect drive and be guaranteed that I have cleaned out as much cuff and old software as possible. I currently boot a flaky machine off of an external drive and then use Migration Assistant to move the User folder from the internal drive to the OS on the external drive. Then I blow away the internal drive and install a clean, up to date config with all the currently required apps. I reboot to the internal drive with the external still attached and do Migration Assistant of the user's account folder back to the internal drive. This has worked well for us but now I want to script it to speed up the process.
Posted on 12-18-2015 08:51 AM
Pretty sure there's an old thread on here somewhere that discusses various options for migrating user data from one location to another in relation to re-imaging a Mac.
It was once asked why JAMF didn't have such a process built in to the suite, and their answer was, at the time, that its risky business when talking about preserving user data and wiping drive contents. They'd rather not get into the "backup" business. Especially since there are some really good existing enterprise level tools out there to help with backing up and restoring user data.
But, it should be scriptable if you want to go that route. You just need to make sure its very robust and can handle any possible errors or issues since, again, we're talking about trusting an automated process to handle user data.