Citrix Datastore Backup and Recovery

0 Shares

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.

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.

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.

[sourcecode language=”plain”]
"C:Program Files (x86)Microsoft SQL Server90Toolsbinnsqlcmd.exe" -S DC01SQLEXPRESS -i "C:Program Files (x86)Microsoft SQL ServerXA6DBBackup.sql"
xcopy "C:Program Files (x86)Microsoft SQL ServerMSSQL.1MSSQLBackupXA6DB.bak" "%XA%BackupXA6DBBackup" /Y
[/sourcecode]

Finally we need to create an Schedule Task in Task Scheduler.

Restore :

You can restore the database any time. Right click Databases and select Restore Database.

Choose your target and source database.

0 Shares

Automation Framework Community Edition

The fastest way to build your lab environment.

Virtual Expo

Friday 30th of September 2022

Leave a Comment