Restore macOS Server from a Time Machine backup
Find out about restoring macOS Server from a local Time Machine backup.
In macOS Server, service data can be stored on a non-startup volume. The steps to restore from a Time Machine backup depend on whether your data was stored on the startup (boot) volume or a non-startup volume.
When restoring, restore from a local Time Machine backup. If you try to restore from a network-based Time Machine backup, not all settings will be restored correctly.
If service data is on the startup volume, or only the startup volume is being restored
Make sure the Time Machine backup drive is connected.
Start up in macOS Recovery on your Intel-based Mac or Mac with Apple silicon.
Select Restore from Time Machine Backup and follow the onscreen instructions for restoring the volume.
If you used the Mail service before restoring, toggle the Mail service off and back on again in the Server app.
If service data is on a non-startup volume, or both the startup and non-startup need to be restored
These steps apply if the non-startup volume is being restored, or both the startup and non-startup volumes need to be restored in Lion Server v10.7.3 and later, including macOS Server.
Make sure the Time Machine backup drive is connected.
Start up in macOS Recovery on your Intel-based Mac or Mac with Apple silicon.
Open Disk Utility, then click Continue.
If your Time Machine drive isn't encrypted, skip to step 7.
Control-click or right-click the Time Machine volume, then select Decrypt.
Enter the volume password and click OK.
Create or make sure you have a new service data volume that is large enough to store your previous data and has the same name as your previous service data volume. For example, if your service data was stored on a 500 GB volume named "DataHD", make sure you have a new volume of at least 500 GB named "DataHD".
Quit Disk Utility.
From the Utilities menu, choose Terminal.
Enter the following command on one line. ReplaceTime Machine Backup Disk with the name of your Time Machine backup disk, servername with the name of your server, and Startup Volume Name with the name of your previous startup volume.
cd /Volumes/Time Machine Backup Disk/Backups.backupdb/servername/Latest/Startup Volume Name/
Enter the following command on one line. ReplaceService Data Volume with the name of your original (and future) service data volume.
./usr/bin/tmutil restore -v ../Service Data Volume/* /Volumes/Service Data Volume
Quit Terminal.
If you also need to restore the startup volume, select Restore from Time Machine Backup and follow the onscreen instructions.
Learn more
Time Machine is the native backup service for macOS Server. macOS Server also includes a process called ServerBackup which works with Time Machine. ServerBackup performs daily backups of Open Directory (if it's turned on). These daily backups are included in the Time Machine backup of Server. ServerBackup also takes part in the restoration of server services, running during the first startup after a server has been restored, and restoring server services and databases into place after the server has started up.