ML
    • Recent
    • Categories
    • Tags
    • Popular
    • Users
    • Groups
    • Register
    • Login

    Using Rsync to remotely backup Apple OSX User profiles

    IT Discussion
    osx terminal rsync command line cli macos macosx mac
    2
    6
    1.1k
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • DustinB3403D
      DustinB3403
      last edited by scottalanmiller

      The reasons for needing to use Rsync are pretty obvious, for my purposes the reasons are to make domain migrations a bit easier, specifically so I can backup the user profile with the user still using the laptop and only having to sync the changes they've made once I'm ready to do all of the heavy lifting (taking their device away).

      In this example I'm using Rsync to backup to an external volume attached to my Apple Laptop. You can rsync to a local directory if you wanted.

      First you'll need to enable the root account on your target computer as Apple has disabled the root account by default, read here on how to enable this.

      You can now begin the Rsync process (I'm still playing with the options so take them with a grain of salt)

      rsync -av -e ssh [email protected]:/Users/UserName/ /Volumes/VolumeName --progress

      At this point the sync process will begin for the target user account and once completed you can go and grab the user workstation and only sync the delta.

      1 Reply Last reply Reply Quote 2
      • DustinB3403D
        DustinB3403
        last edited by

        You'll need root access on the user system to ensure you can copy the actual user profile (desktop, documents, downloads and literally everything else).

        Without enabling the root account, you'll initially get "Permission denied" errors that you won't be able to work around without enabling root.

        Of course, once the root account is enabled, you could setup ssh keys, and deploy those keys to each of your target workstations so you don't have to pass credentials.

        1 Reply Last reply Reply Quote 0
        • black3dynamiteB
          black3dynamite
          last edited by black3dynamite

          ssh -t admin@hostname 'sudo rsync -av /Users/UserName/ /Volumes/VolumeName --progress'
          

          No need to enable root, just use an account that has sudo rights.

          DustinB3403D 1 Reply Last reply Reply Quote 1
          • DustinB3403D
            DustinB3403 @black3dynamite
            last edited by

            @black3dynamite in my testing root access is required as the local admin account can't elevate to access the user files that are from the domain.

            This is evidenced in looking at the users root folders and seeing things with the red stop symbol.

            I will give that a try though and see what occurs.

            1 Reply Last reply Reply Quote 0
            • DustinB3403D
              DustinB3403
              last edited by

              So I just tested @black3dynamite and while it appears to work, it doesn't actually copy the files. It runs, but nothing is loaded into the destination.

              Going back and testing again, but I need to keep forward progress on this project.

              1 Reply Last reply Reply Quote 0
              • DustinB3403D
                DustinB3403
                last edited by

                Worth noting that using rsync worked very well, but there were issues with the Outlook profile on the existing user workstation and the end result.

                Not a huge issue for us as everything is stored in O365, but worth being mindful of if your email was hosted locally.

                Also because of username convention changes, I had to set the ownership of the user profile to match the new shortened name.

                1 Reply Last reply Reply Quote 0
                • 1 / 1
                • First post
                  Last post