Backup Script for Ghost v8.3

A quick little CMD script to stop a Ghost server, backup the config files, then restart the server.
Useful for testing … and recovery when you test goes ‘a little too far!’ Not overly elegant but quite useful;

:: GHOST-BACKUP.cmd
:: Contributor: ME 🙂
:: Created: 29 May 2007
:: Updated: 29 May 2007
:: Status: Current
:: Subject: Ghost server config backup
:: files backed up to drive “Z:”

for /f “tokens= 2,3,4 delims=/- ” %%i in (‘date /t’) do set yymmdd=%%k_%%i_%%j

:: ===STOP GHOST SERVER===
C:
cd “C:\Program Files\Symantec\Ghost\”
ngserver.exe -stop

:: ===COPY FILES ===
Z:
cd Z:\BACKUP-Ghost
mkdir %yymmdd%
copy “C:\Program Files\Symantec\Ghost\privkey.crt” Z:\BACKUP-Ghost\%yymmdd%\privkey.crt
copy “C:\Program Files\Symantec\Ghost\pubkey.crt” Z:\BACKUP-Ghost\%yymmdd%\pubkey.crt
xcopy “C:\Program Files\Symantec\Ghost\db\*.*” Z:\BACKUP-Ghost\%yymmdd%\db\*.* /s /Y

:: ===START GHOST SERVER===
C:
cd “C:\Program Files\Symantec\Ghost\”
ngserver.exe -start

:end

This entry was posted in geek. Bookmark the permalink.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.