The following pre-clone shell script will archive a macOS Server Open Directory master to a disk image for later restoration via the server administration application. The expect shell environment can be helpful for this task. # mysql -u root -p database_name < $recover/database_name.dump Backing up an Open Directory MasterĪrchiving an OD master database requires encryption, and providing the encryption password interactively can be challenging in an automated backup. # gunzip $recover/database_name_(timestamp).dump.gz Starting in Mac OS X Lion, Apple began selling the Server software as a downloadable add-on app for any Mac, coinciding with the death of Apples last rack-mounted Xserve hardware. # If you ever need to restore from a database dump, you would run: # Path to recovery directory (permissions should be 700 - read-only root or admin)Įcho "Removing manual archives older than two weeks"įind $recover/ -mindepth 1 -mtime +14 -exec rm '.dump PATH="$PATH:/Applications/Server.app/Contents/ServerRoot/usr/libexec" PATH="$PATH:/Applications/Server.app/Contents/ServerRoot/usr/sbin" In the event that your standard backup of the database doesn't open, you can later restore it from the dump. The following pre-clone shell script will dump the contents of any MySQL databases. The CCC backup task will subsequently back up the database archive files, from which you could restore the database at a later time. In CCC, you can leverage a preflight shell script to perform an "out of band" backup of various databases using database-specific tools. Databases are proprietary file types that often cannot be backed up in the conventional manner.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |