Saturday, June 18, 2011

Citrix: Datastore Backup and Restore (SQL 2005)

Here is the step-by-step procedure about how to backup Citrix database on SQL 2005 server.

Note: Do not use DSMAINT BACKUP builtin Citrix command. This command is only used if you want to take backup of MS Access or MSDE database.

Backup up database

Steps
  1. Log into the database server and open Microsoft SQL Server Management Studio.
  2. Navigate to the Citrix/XenApp database. Here I am using the database named "XenApp".
  3. Right Click on the database --> Tasks --> Back Up

     
  4. Select the backup type. The default is Full. I prefer to use Full database backup as the database size is very small.
     
  5. Click on Option. Keep the default options. To schedule the backup job click on Script and then select Script action to job.



     
  6. Go to Schedule and click on New to create a backup schedule.



      
  7. Click OK thrice to start and schedule the backup process. Once database backed-up successfully, you will get the following notification.

     
  8. The default backup location is C:\Program Files\Microsoft SQL Server\MSSQL.1\MSSQL\Backup\
Restoration
The backedup database can be restore any time if you feel datastore has been corrputed. To do so perform the following steps.
  1. To restore, Right Click on Database and then select Restore Database.

     
  2. Select the To Database and From Database from the drop-down list. Here I have selected XenApp as this is the database I want to restore.
     
  3. Go to Option and select Overwrite the existing database. Click OK to start the restoration procedure.

     
  4. After restoration is successfully completed, you will get the following message. Click OK to close the message.

8 comments:

  1. nice work dude....lot of info is there....thanks..

    ReplyDelete
  2. We just had a part of our datastore corrupted, only user policies part.
    We got a farm with more then one server in it, do we need to restart services to get the local database refilled when replacing the central one?

    ReplyDelete
  3. Johnny,

    Restarting services may be an option, but if it does not work I think it's better to restore the database if you have proper backup.

    Thanks.

    ReplyDelete
  4. Thanks for sharing the recovery guide. I would like also to suggest you a third party utility, with the help of this software we can recover your data in few minutes. Website offering free version also. visit the urls to get more information.

    http://www.recoverydeletedfiles.com/sql-database-recovery-software.html


    Thanks

    ReplyDelete
  5. This comment has been removed by the author.

    ReplyDelete
  6. SQL Database Repair is the best SQL database repair software that comes with plethora of options to recover data from corrupt or damaged SQL databases. The software can repair/recover both the .MDF and .NDF SQL database files. Corruption of damage of the SQL database file can occur due to several reasons, including application malfunction, file header corruption, OS crash, virus infection etc. The smart scan engine of the software is equipped to carry out precise database recovery through non-destructive mechanisms.For more information click
    http://database-recovery.weebly.com

    ReplyDelete
  7. SQL database stores data in MDF format which sometimes may get corrupt due to Virus attack, invalid database file header, insufficient available space, corruption of media etc. In such situations the user can use the software SQL Recovery which can recovers the data from corrups MDF file. More information about this tool can be found at :- http://www.filesrepairtool.com/sql-database-repair.html

    ReplyDelete
  8. Another SQL Database Recovery is the best options to recover data from damaged or corrupt SQL databases. The software can repair both the MDF and NDF SQL database files.This software work on QFSCI algorithm and recover data in script form.

    Download now: http://www.pcrecoveryutility.com/sql-database-recovery.html

    ReplyDelete