chattphotos

Q: Migrate cache to new server

I've been running Server on an older computer and now I got a new one and have finished setting it up.

 

I have many apps and OS installs cached on the old server, how do I migrate the cache to the new server?

 

10.11.5 with server 5.1.5

Posted on Jul 7, 2016 2:43 PM

Close

Q: Migrate cache to new server

  • All replies
  • Helpful answers

  • by More Broccoli Please,

    More Broccoli Please More Broccoli Please Jul 8, 2016 7:34 AM in response to chattphotos
    Level 1 (19 points)
    Jul 8, 2016 7:34 AM in response to chattphotos

    Two ways.

     

    1.  If the new server can peer with the old one, just run both servers for a while.  The new one will gradually pull data it needs from the old one as clients request it.  This method is best if the new server already has data cached that the old one doesn't.

     

    2.  For a more immediate clone, stop both caching servers, run this command in Terminal on the new server, then start the new caching server up again.  Replace admin-user with the name of an administrator account on the old server, and old-server with the name or IP address of the old server.

    $ sudo rsync -a --delete admin-user@old-server:/Library/Server/Caching/Data/ /Library/Server/Caching/Data/

    The sudo and the trailing slashes (after Data) are important.  This command replaces the new caching server's cache with the contents of the old one, assuming both of them store their caches in the default location on the boot drive.  If either one uses a different location, modify the command accordingly.  Be sure to copy only the Data directory and not the entire Caching directory.

  • by chattphotos,

    chattphotos chattphotos Jul 8, 2016 9:49 AM in response to More Broccoli Please
    Level 4 (2,412 points)
    Desktops
    Jul 8, 2016 9:49 AM in response to More Broccoli Please

    I solved already by doing a copy in finder from the data drive to the new install.
    Replaced the new database files with the old ones and rebooted, all is good.

     

    Thanks!

  • by More Broccoli Please,

    More Broccoli Please More Broccoli Please Jul 8, 2016 9:53 AM in response to chattphotos
    Level 1 (19 points)
    Jul 8, 2016 9:53 AM in response to chattphotos

    Finder might not have set the ownership correctly.  I suggest you run this command in Terminal:

    $ sudo chown -R _assetcache:_assetcache /Library/Server/Caching/Data