Shibhu Checkpoint Blog

Shibhu Checkpoint Blog
Click Above Image for Interview Techniques

Monday, September 5, 2011

Citrix Datastore Backup and Recovery



Citrix DataStore Backup and Restore 300x187
In this post I’m going to show you how to automatically backup and restore your Citrix DataStore Database on SQL Server Express. First you’ll need to download and install Microsoft SQL Server Management Studio and then connect to your server.
Backup :
Right click your Citrix Datastore Database and select Tasks – Backup.
Citrix DataStore Backup and Restore 01 300x187
Use the default settings on the General and Options tab. If you’re using SQL Server Express select Script Action to File from the Options tab. If you’re running a full blown SQL Server select Script Action to Job.
Citrix DataStore Backup and Restore 03 300x187
Save the SQL Server Script file in your preferred location. In this example I’ll be using C:\Program Files (x86)\Microsoft SQL Server.
Open up Notepad and paste the content below (double click to mark and copy). These commands will automatically backup the SQL Database and then copy the XA6DB.bak to a network share. This way you can easily go back in time and restore your database even if your SQL server has crashed.
"C:\Program Files (x86)\Microsoft SQL Server\90\Tools\binn\sqlcmd.exe" -S DC01\SQLEXPRESS -i "C:\Program Files (x86)\Microsoft SQL Server\XA6DBBackup.sql"
xcopy "C:\Program Files (x86)\Microsoft SQL Server\MSSQL.1\MSSQL\Backup\XA6DB.bak" "%XA%\Backup\XA6DBBackup\" /Y
Finally we need to create an Schedule Task in Task Scheduler.
Citrix DataStore Backup and Restore 07 300x205
Restore :
You can restore the database any time. Right click Databases and select Restore Database.
Citrix DataStore Backup and Restore 08 300x187
Choose your target and source database.
Citrix DataStore Backup and Restore 09 300x187

No comments:

Post a Comment