Backup and Restore Grooper Repository: Difference between revisions

From Grooper Wiki
No edit summary
// via Wikitext Extension for VSCode
 
(2 intermediate revisions by the same user not shown)
Line 12: Line 12:
# Copy the Grooper File Store from the source server to the target server.
# Copy the Grooper File Store from the source server to the target server.
# Change the Primary File Store's path to copied File Store's location by updating the File Store object in the Tree Node table in SQL Server Management Studio.
# Change the Primary File Store's path to copied File Store's location by updating the File Store object in the Tree Node table in SQL Server Management Studio.
# Create a new Grooper Repository connection on the target server, connecting to the restored Grooper Database on the target server in Grooper Config.
# Create a new Grooper Repository connection on the target server, connecting to the restored Grooper Database on the target server in Grooper Command Console.
# Verify objects and files are accessible in new Grooper Repository connection.
# Verify objects and files are accessible in new Grooper Repository connection.


Line 23: Line 23:
|}
|}


== How To ==
== 1. Backup Source Database ==
 
<tabs style="margin:20px">
<tab name="1. Backup Source Database" style="margin:20px">
 
First, we're going to backup the Grooper Database on the source server.
First, we're going to backup the Grooper Database on the source server.


'''''FIRST AND FOREMOST!  DO NOT CONTINUE UNTIL READING THE NEXT LINE'''''
'''''FIRST AND FOREMOST!  DO NOT CONTINUE UNTIL READING THE NEXT LINE'''''


Ensure all Grooper services running on the source server are '''''stopped''''' and any Grooper applications (Grooper Design Studio, Grooper Config, etc) are '''''closed'''''.
Ensure all Grooper services running on the source server are '''''stopped'''''.


{|cellpadding=10 cellspacing=5
|valign=top style="width:40%"|
<br>
On the source server, open Microsoft SQL Server Management Studio.
On the source server, open Microsoft SQL Server Management Studio.
# Select the SQL Server hosting the Grooper Database.
# Select the SQL Server hosting the Grooper Database.
# Select ''Connect''.
# Select ''Connect''.
|valign=top|
 
[[File:2022-backup-restore-repo-01.png]]
[[File:2022-backup-restore-repo-01.png]]
|-
 
|valign=top|
 
<br>
# Expand the '''Databases''' folder.
# Expand the '''Databases''' folder.
# Right-click the Grooper Database you wish to back up.
# Right-click the Grooper Database you wish to back up.
#* In this case, the database I want to back up is named "2022DB".  This is the name I gave when originally creating the Grooper Repository in Grooper Config.
#* In this case, the database I want to back up is named "2022DB".  This is the name I gave when originally creating the Grooper Repository in Grooper Command Console.
# Select ''Tasks''
# Select ''Tasks''
# Select ''Back Up...''
# Select ''Back Up...''
|valign=top|
 
[[File:2022-backup-restore-repo-02.png]]
[[File:2022-backup-restore-repo-02.png]]
|-
 
|valign=top|
 
<br>
This will bring up the '''''Back Up Database''''' configuration window for the selected database.
This will bring up the '''''Back Up Database''''' configuration window for the selected database.
# Ensure '''''Back up to:''''' ''Disk'' is selected.
# Ensure '''''Back up to:''''' ''Disk'' is selected.
# Select ''Add...''
# Select ''Add...''
|valign=top|
 
[[File:2022-backup-restore-repo-03.png]]
[[File:2022-backup-restore-repo-03.png]]
|-
 
|valign=top|
 
#<li value=3> In the following window, select the ellipsis button next to the file name property.
#<li value=3> In the following window, select the ellipsis button next to the file name property.
|valign=top|
 
[[File:2022-backup-restore-repo-04.png]]
[[File:2022-backup-restore-repo-04.png]]
|-
 
|valign=top|
 
<br>
# Select which folder in which you want to save the backup file.
# Select which folder in which you want to save the backup file.
#* This will default to the "Backup" folder for wherever SQL is installed on your machine, but you can change it to whatever folder location you would like.
#* This will default to the "Backup" folder for wherever SQL is installed on your machine, but you can change it to whatever folder location you would like.
Line 75: Line 63:
#* We've named ours ''RepoBackup.bak''
#* We've named ours ''RepoBackup.bak''
# Select ''OK'' when finished.
# Select ''OK'' when finished.
|valign=top|
 
[[File:2022-backup-restore-repo-05.png]]
[[File:2022-backup-restore-repo-05.png]]
|-
 
|valign=top|
 
<br>
#<li value=4> In the following window select ''OK''.
#<li value=4> In the following window select ''OK''.
|valign=top|
 
[[File:2022-backup-restore-repo-06.png]]
[[File:2022-backup-restore-repo-06.png]]
|-
 
|valign=top|
 
<br>
# You will see your ''.bak'' database backup file's location popup in the list.
# You will see your ''.bak'' database backup file's location popup in the list.
# Select ''OK'' to backup the database.
# Select ''OK'' to backup the database.
|valign=top|
 
[[File:2022-backup-restore-repo-07.png]]
[[File:2022-backup-restore-repo-07.png]]
|-
 
|valign=top|
 
<br>
Upon successful creation of the backup file, you will see the following success message.
Upon successful creation of the backup file, you will see the following success message.
#<li value=3> Click ''OK'' to continue.
#<li value=3> Click ''OK'' to continue.
You may close out of Microsoft SQL Server Management Studio at this point.


You may close out of Microsoft SQL Server Management Studio at this point.
|valign=top|
[[File:2022-backup-restore-repo-08.png]]
[[File:2022-backup-restore-repo-08.png]]
|}
</tab>
<tab name = "2. Restore Database" style="margin:20px">
=== 2. Restore Database ===


== 2. Restore Database ==
Next, we will take our database backup, copy it over to our target server and restore it to a new database.
Next, we will take our database backup, copy it over to our target server and restore it to a new database.


{|cellpadding=10 cellspacing=5
|valign=top style="width:40%"|
<br>
# Copy the ''.bak'' backup file from the source server to the target server.
# Copy the ''.bak'' backup file from the source server to the target server.
#* We've just placed ours at the root of the C Drive (C:) in our target server.  
#* We've just placed ours at the root of the C Drive (C:) in our target server.  
|valign=top|
 
[[File:2022-backup-restore-repo-09.png]]
[[File:2022-backup-restore-repo-09.png]]
|-
 
|valign=top|
 
<br>
On the target server, open Microsoft SQL Server Management Studio.
On the target server, open Microsoft SQL Server Management Studio.


# Select the destination SQL Server.
# Select the destination SQL Server.
# Select ''Connect''.
# Select ''Connect''.
|valign=top|
 
[[File:2022-backup-restore-repo-10.png]]
[[File:2022-backup-restore-repo-10.png]]
|-
 
|valign=top|
 
<br>
# Right-click the '''Databases''' folder.
# Right-click the '''Databases''' folder.
# Select ''Restore Database...''
# Select ''Restore Database...''
|valign=top|
 
[[File:2022-backup-restore-repo-11.png]]
[[File:2022-backup-restore-repo-11.png]]
|-
 
|valign=top|
 
<br>
This will bring up the '''''Restore Database''''' configuration window.
This will bring up the '''''Restore Database''''' configuration window.
# Ensure '''''Device''''' is selected.
# Ensure '''''Device''''' is selected.
# Press the ellipsis button at the end of the '''''Device''''' property.
# Press the ellipsis button at the end of the '''''Device''''' property.
|valign=top|
 
[[File:2022-backup-restore-repo-12.png]]
[[File:2022-backup-restore-repo-12.png]]
|-
 
|valgin=top|
 
<br>
#<li value=3> On the following screen, select ''Add''.
#<li value=3> On the following screen, select ''Add''.
|valign=top|
 
[[File:2022-backup-restore-repo-13.png]]
[[File:2022-backup-restore-repo-13.png]]
|-
 
|valign=top|
 
<br>
This will bring up a folder browser to find the database backup file you copied over.
This will bring up a folder browser to find the database backup file you copied over.
# Use the left panel to navigate to the folder where the backup file is located.
# Use the left panel to navigate to the folder where the backup file is located.
# Use the right panel to select the backup file.
# Use the right panel to select the backup file.
# Select ''OK'' when finished.
# Select ''OK'' when finished.
|valign=top|
 
[[File:2022-backup-restore-repo-14.png]]
[[File:2022-backup-restore-repo-14.png]]
|-
 
|valign=top|
 
<br>
#<li value=3> You will see your backup file pop up in the "Backup media" list.
#<li value=3> You will see your backup file pop up in the "Backup media" list.
# Select ''OK'' to continue.
# Select ''OK'' to continue.
|valign=top|
 
[[File:2022-backup-restore-repo-15.png]]
[[File:2022-backup-restore-repo-15.png]]
|-
 
|valign=top|
 
<br>
This will take you back to the '''''Restore Database''''' screen.
This will take you back to the '''''Restore Database''''' screen.
# Ensure your backup file appears in the "Backup sets to restore" list and the '''''Restore''''' column is checked.
# Ensure your backup file appears in the "Backup sets to restore" list and the '''''Restore''''' column is checked.
# Select ''OK'' to restore the database.
# Select ''OK'' to restore the database.
|valign=top|
 
[[File:2022-backup-restore-repo-16.png]]
[[File:2022-backup-restore-repo-16.png]]
|-
 
|valign=top|
 
<br>
Success!  The database is now restored on the current server.
Success!  The database is now restored on the current server.
#<li value=3> Select ''OK'' in the success window to continue.


#<li value=3> Select ''OK'' in the success window to continue.
|valign=top|
[[File:2022-backup-restore-repo-17.png]]
[[File:2022-backup-restore-repo-17.png]]
|-
 
|
 
#<li value=4>  Our source database has been restored to this server.
#<li value=4>  Our source database has been restored to this server.
#* Effectively, we've copied a Grooper Repository's Database from one server to another.
#* Effectively, we've copied a Grooper Repository's Database from one server to another.


We're half-way done with copying over the Grooper Repository.  Remember, a Grooper Repository consists of two things:
We're half-way done with copying over the Grooper Repository.  Remember, a Grooper Repository consists of two things:
* A database
* A database
* A file store
* A file store
We've taken care of the database.  Now, we need to take care of the file store.


We've taken care of the database.  Now, we need to take care of the file store.
|valgin=top|
[[File:2022-backup-restore-repo-18.png]]
[[File:2022-backup-restore-repo-18.png]]
|}
</tab>
<tab name="3. Copy the File Store" style="margin:20px">
=== 3. Copy the File Store ===


== 3. Copy the File Store ==
This step should be fairly straightforward.
This step should be fairly straightforward.


{|cellpadding=10 cellspacing=5
|valign=top style="width:40%"|
First, find the location of the source Grooper Repository's File Store on the source server.
First, find the location of the source Grooper Repository's File Store on the source server.


# Make a copy of the Grooper Repository's File Store folder.
# Make a copy of the Grooper Repository's File Store folder.
|valign=top|
 
[[File:2022-backup-restore-repo-19.png]]
[[File:2022-backup-restore-repo-19.png]]
|-
 
|valign=top|
 
<br>
#<li value=2> Paste the copied File Store to a location on the target server.
#<li value=2> Paste the copied File Store to a location on the target server.


The (somewhat) trickier part is informing the Grooper Database ''this'' is the location of the file store (and ''not'' whatever it was on the source server).  Next, we're going to edit the File Store's location path in the Grooper database from Microsoft SQL Server Management Studio.


The (somewhat) trickier part is informing the Grooper Database ''this'' is the location of the file store (and ''not'' whatever it was on the source server).  Next, we're going to edit the File Store's location path in the Grooper database from Microsoft SQL Server Management Studio.
|valign=top|
[[File:2022-backup-restore-repo-20.png]]
[[File:2022-backup-restore-repo-20.png]]
|}
</tab>
<tab name="4. Change the File Store Path" style="margin:20px">
=== 4. Change the File Store Path ===


== 4. Change the File Store Path ==
Next, we're going to go into the Grooper Database's Tree Node table and manually edit the File Store object's location path.  This will update the Grooper Database in such a way that it will use the copied File Store on the target server, instead of the original File Store on the source server.
Next, we're going to go into the Grooper Database's Tree Node table and manually edit the File Store object's location path.  This will update the Grooper Database in such a way that it will use the copied File Store on the target server, instead of the original File Store on the source server.


Line 239: Line 192:
|}
|}


{|cellpadding=10 cellspacing=5
 
|valign=top style="width:40%"|
<br>
Open Microsoft SQL Management Studio.
Open Microsoft SQL Management Studio.
# Expand the '''Databases''' folder.
# Expand the '''Databases''' folder.
# Select and expand the restored Grooper Database.
# Select and expand the restored Grooper Database.
Line 249: Line 199:
# Right-click the '''dbo.TreeNode''' table.
# Right-click the '''dbo.TreeNode''' table.
# Select ''Select Top 1000 Rows''
# Select ''Select Top 1000 Rows''
|valign=top|
 
[[File:2022-backup-restore-repo-21.png]]
[[File:2022-backup-restore-repo-21.png]]
|-
 
|valign=top|
 
<br>
# Add the following line to the end of the SELECT statement.
# Add the following line to the end of the SELECT statement.
#* <code>WHERE [TypeName] = 'Grooper.FileStore'</code>
#* <code>WHERE [TypeName] = 'Grooper.FileStore'</code>
Line 262: Line 211:
# Select the value in the '''''Properties''''' column.
# Select the value in the '''''Properties''''' column.
# Copy it.
# Copy it.
|valign=top|
 
[[File:2022-backup-restore-repo-22.png]]
[[File:2022-backup-restore-repo-22.png]]
|-
 
|valign=top|
 
<br>
Enter a couple blank lines at the end of the query.
Enter a couple blank lines at the end of the query.
# Type the following to the end of the query:
# Type the following to the end of the query:
<code style="margin-left:60px">UPDATE [</code><code>'''''your database's name'''''</code><code>].[dbo].[TreeNode]</code><br>
<code style="margin-left:60px">UPDATE [</code><code>'''''your database's name'''''</code><code>].[dbo].[TreeNode]</code><br>
Line 292: Line 239:
If you execute the statement ''without'' a <code>WHERE</code> clause, you will update the properties for ''all'' nodes in your Grooper Repository, effectively ruining it.  But if you do, it's a good thing you have a backup to revert to!
If you execute the statement ''without'' a <code>WHERE</code> clause, you will update the properties for ''all'' nodes in your Grooper Repository, effectively ruining it.  But if you do, it's a good thing you have a backup to revert to!
|}
|}
|valign=top|
 
[[File:2022-backup-restore-repo-23.png]]
[[File:2022-backup-restore-repo-23.png]]
|-
 
|valign=top|
 
<br>
# Enter the following line at the end of the query:
# Enter the following line at the end of the query:
#* <code>WHERE [TypeName] = 'Grooper.FileStore'</code>
#* <code>WHERE [TypeName] = 'Grooper.FileStore'</code>
Line 303: Line 249:
# Execute the selected portion of the query.
# Execute the selected portion of the query.
#* Press this button or hit <code>F5</code> on your keyboard.
#* Press this button or hit <code>F5</code> on your keyboard.
|valign=top|
 
[[File:2022-backup-restore-repo-24.png]]
[[File:2022-backup-restore-repo-24.png]]
|-
 
|valign=top|
 
<br>
#<li value=4> You should see the following message indicating "1 row affected".  This means you successfully updated the File Store object's storage path.
#<li value=4> You should see the following message indicating "1 row affected".  This means you successfully updated the File Store object's storage path.


At this point we've fully copied over the Grooper Database and File Store for the Grooper Repository from the source server.  With a Grooper Database and File Store in place, this is effectively a Grooper Repository at this point.  
At this point we've fully copied over the Grooper Database and File Store for the Grooper Repository from the source server.  With a Grooper Database and File Store in place, this is effectively a Grooper Repository at this point.  
All we need to do now is establish a connection to it.  
All we need to do now is establish a connection to it.  
|valign=top|
 
[[File:2022-backup-restore-repo-25.png]]
[[File:2022-backup-restore-repo-25.png]]
|}


</tab>
== 5. Create a Grooper Repository Connection ==
<tab name="5. Create a Grooper Repository Connection" style="margin:20px">
All that is left is to create a new Grooper Repository connection to the Grooper Database and File Store, just like we would connect to any other Grooper Repository using Grooper Command Console.
=== 5. Create a Grooper Repository Connection ===


All that is left is to create a new Grooper Repository connection to the Grooper Database and File Store, just like we would connect to any other Grooper Repository using Grooper Config.
Open Grooper Command Console.


{|cellpadding=10 cellspacing=5
Use the following command:
|valign=top style="width:40%"|
<pre>connections add <server> <database> [user] [password]</pre>
<br>
Portions of the command in angled brackets are required, while portions in square brackets are not.
Open Grooper Config.
* You will need to replace <code><server></code> with the appropriate hostname of your Grooper server.
* You will need to replace <code><database></code> with the appropriate database name of your Grooper database.
* <code>[user]</code> and <code>[password]</code> are only needed if you are passing explicit user credentials for authentication.


# Select the '''''Repositories''''' property.
# Select the '''''Repositories''''' property.
# Press the ellipsis button at the end.
# Press the ellipsis button at the end.
|valign=top|
[[File:2022-backup-restore-repo-26.png]]
|-
|valign=top|
<br>
# Press the ''Add'' button to add a new Grooper Repository connection.
# Enter the '''''Server Name'''''.
#* In our case, the SQL instance on our local/target server.
# Enter the '''''Database Name'''''.
#* This is the name of the database we restored from the backup file.
# Press the ''Test Connection'' button.
|valign=top|
[[File:2022-backup-restore-repo-27.png]]
|-
|valign=top|
<br>
If you restored the database correctly, you will see a "Connection Successful!" message appear.


#<li value=5> Click ''OK'' to continue.
You've now successfully copied one Grooper Repository from one server to another and connected to it.  Next, we're going to open the Grooper site and verify we've done our job correctly.
|valign=top|
 
[[File:2022-backup-restore-repo-28.png]]
{|class="attn-box"
|-
|-
|valign=top|
|
<br>
|
#<li value=6> Select ''OK'' to finish setting up the connection.
At this point be sure to refresh the App Pool in IIS for the Grooper website on your Grooper web server.
|valign=top|
[[File:2022-backup-restore-repo-29.png]]
|-
|valign=top|
<br>
#<li value=7> Select ''Save'' to finalize.
#* FYI:  If you want the new Grooper Repository connection to be the default one, you can make it so using the '''''Default Repository''''' property on this screen.
 
You've now successfully copied one Grooper Repository from one server to another and connected to it.  Next, we're going to open up Grooper Design Studio and verify we've done our job correctly.
|valign=top|
[[File:2022-backup-restore-repo-30.png]]
|}
|}
</tab>
<tab name = "6. Verify Connection" style="margin:20px>
=== 6. Verify Connection ===


Now, we should be able to open this Grooper Repository in Grooper Design Studio and access and configure its objects like normal.  Let's verify this.
== 6. Verify Connection ==
Now, we should be able to open this Grooper Repository in Grooper and access and configure its objects like normal.  Let's verify this.


{|cellpadding=10 cellspacing=5
|valign=top style="width:40%"|
Go to your Grooper website.
Go to your Grooper website.


Line 381: Line 293:
# Select ''Repository'' in the top menu bar.
# Select ''Repository'' in the top menu bar.
# Select the copied/restored Grooper Repository.
# Select the copied/restored Grooper Repository.
|valign=top|
 
[[File:2023_Backup-and-Restore-Grooper-Repository_01.png]]
[[File:2023_Backup-and-Restore-Grooper-Repository_01.png]]
|-
 
|valign=top|
 
<br>
If you're able to switch to the Grooper Repository or otherwise load it in Grooper ''at all'' that's a good first sign.  If you get an error message, likely the database backup was corrupted and you'll need to start all over at step 1.
If you're able to switch to the Grooper Repository or otherwise load it in Grooper Design Studio ''at all'' that's a good first sign.  If you get an error message, likely the database backup was corrupted and you'll need to start all over at step 1.


Another good test is to select objects in the repository and verify their properties are loaded as expected.
Another good test is to select objects in the repository and verify their properties are loaded as expected.
 
# Here, we've selected a '''Content Model''' in the Node Tree on the "Design" page.
# Here, we've selected a '''Content Model''' in the Node Tree.
# It loads the '''Content Model's''' properties with no error and configured as they were on the source server.
# It loads the '''Content Model's''' properties with no error and configured as they were on the source server.
#* This is another good sign there's nothing wrong with the Grooper Database backup.
#* This is another good sign there's nothing wrong with the Grooper Database backup.
|valign=top|
 
[[File:2023_Backup-and-Restore-Grooper-Repository_02.png]]
[[File:2023_Backup-and-Restore-Grooper-Repository_02.png]]
|-
|valign=top|
<br>
Next, we need to verify there's nothing wrong with our Grooper Repository's File Store.  For that, we'll need to select an object in the Node Tree that has something in the file store associated with it, like a document or page in a '''Batch'''.


Next, we need to verify there's nothing wrong with our Grooper Repository's File Store.  For that, we'll need to select an object in the Node Tree of the "Design" page that has something in the file store associated with it, like a document or page in a '''Batch'''.
# Here, we've selected a test '''Batch''' in the Node Tree.
# Here, we've selected a test '''Batch''' in the Node Tree.
# I can see page object's thumbnails loaded and select a page object in the '''Batch'''.
# I can see page object's thumbnails loaded and select a page object in the '''Batch'''.
# I can see the page's content load in the Document Viewer.
# I can see the page's content load in the Document Viewer.


This is all a good indication the File Store was copied over correctly, and we correctly reassigned its storage path.


This is all a good indication the File Store was copied over correctly, and we correctly reassigned its storage path.
|valign=top|
[[File:2023_Backup-and-Restore-Grooper-Repository_03.png]]
[[File:2023_Backup-and-Restore-Grooper-Repository_03.png]]
|-
 
|valign=top|
 
<br>
This is what it looks like when things go wrong.
This is what it looks like when things go wrong.


Line 417: Line 323:
# If you try and select something, you're met with this error message.
# If you try and select something, you're met with this error message.
#* Effectively, Grooper expects to find a file in the File Store.  However, the file is not there.  So, Grooper can't fetch the associated/referenced file for the selected object, giving us the error.
#* Effectively, Grooper expects to find a file in the File Store.  However, the file is not there.  So, Grooper can't fetch the associated/referenced file for the selected object, giving us the error.


One of two things went wrong in this case.  Either:
One of two things went wrong in this case.  Either:
* The wrong path was entered when we updated File Store's storage location in SQL Server Management Studio.
* The wrong path was entered when we updated File Store's storage location in SQL Server Management Studio.
* One or more files did not copy over correctly when we copied the source File Store.
* One or more files did not copy over correctly when we copied the source File Store.
|valign=top|
 
[[File:2023_Backup-and-Restore-Grooper-Repository_04.png]]
[[File:2023_Backup-and-Restore-Grooper-Repository_04.png]]
|}
</tab>
:[[#How To|Click here to return to the top]]
</tabs>
[[Category:Articles]]
[[Category:Version 2023]]

Latest revision as of 11:25, 7 November 2024

This article is about the current version of Grooper.

Note that some content may still need to be updated.

2025 20232022

Back up your Grooper Repository to prevent data loss!

Let's say you need to copy a whole Grooper Repository from one server to another. You can do that by backing up the Grooper Database and File Store on the source server and restoring it on the target server.

The general steps are as follows:

  1. Backup the Grooper Database on the source server using SQL Server Management Studio.
  2. Restore the Grooper Database backup on the target server as a new database using SQL Server Management Studio.
  3. Copy the Grooper File Store from the source server to the target server.
  4. Change the Primary File Store's path to copied File Store's location by updating the File Store object in the Tree Node table in SQL Server Management Studio.
  5. Create a new Grooper Repository connection on the target server, connecting to the restored Grooper Database on the target server in Grooper Command Console.
  6. Verify objects and files are accessible in new Grooper Repository connection.

FYI

This guidance would also apply to backing up and restoring a Grooper Repository on the same server. Just instead of creating restoring the Grooper Database as a new database on the target server, you'd restore it as a new database on the self-same source server. Instead of copying the Grooper File Store to a different server, you'd make a local copy.

1. Backup Source Database

First, we're going to backup the Grooper Database on the source server.

FIRST AND FOREMOST! DO NOT CONTINUE UNTIL READING THE NEXT LINE

Ensure all Grooper services running on the source server are stopped.

On the source server, open Microsoft SQL Server Management Studio.

  1. Select the SQL Server hosting the Grooper Database.
  2. Select Connect.


  1. Expand the Databases folder.
  2. Right-click the Grooper Database you wish to back up.
    • In this case, the database I want to back up is named "2022DB". This is the name I gave when originally creating the Grooper Repository in Grooper Command Console.
  3. Select Tasks
  4. Select Back Up...


This will bring up the Back Up Database configuration window for the selected database.

  1. Ensure Back up to: Disk is selected.
  2. Select Add...


  1. In the following window, select the ellipsis button next to the file name property.


  1. Select which folder in which you want to save the backup file.
    • This will default to the "Backup" folder for wherever SQL is installed on your machine, but you can change it to whatever folder location you would like.
  2. Name the backup file whatever you like, but ensure you add .bak to the end of the filename.
    • We've named ours RepoBackup.bak
  3. Select OK when finished.


  1. In the following window select OK.


  1. You will see your .bak database backup file's location popup in the list.
  2. Select OK to backup the database.


Upon successful creation of the backup file, you will see the following success message.

  1. Click OK to continue.

You may close out of Microsoft SQL Server Management Studio at this point.

2. Restore Database

Next, we will take our database backup, copy it over to our target server and restore it to a new database.

  1. Copy the .bak backup file from the source server to the target server.
    • We've just placed ours at the root of the C Drive (C:) in our target server.


On the target server, open Microsoft SQL Server Management Studio.

  1. Select the destination SQL Server.
  2. Select Connect.


  1. Right-click the Databases folder.
  2. Select Restore Database...


This will bring up the Restore Database configuration window.

  1. Ensure Device is selected.
  2. Press the ellipsis button at the end of the Device property.


  1. On the following screen, select Add.


This will bring up a folder browser to find the database backup file you copied over.

  1. Use the left panel to navigate to the folder where the backup file is located.
  2. Use the right panel to select the backup file.
  3. Select OK when finished.


  1. You will see your backup file pop up in the "Backup media" list.
  2. Select OK to continue.


This will take you back to the Restore Database screen.

  1. Ensure your backup file appears in the "Backup sets to restore" list and the Restore column is checked.
  2. Select OK to restore the database.


Success! The database is now restored on the current server.

  1. Select OK in the success window to continue.


  1. Our source database has been restored to this server.
    • Effectively, we've copied a Grooper Repository's Database from one server to another.

We're half-way done with copying over the Grooper Repository. Remember, a Grooper Repository consists of two things:

  • A database
  • A file store

We've taken care of the database. Now, we need to take care of the file store.

3. Copy the File Store

This step should be fairly straightforward.

First, find the location of the source Grooper Repository's File Store on the source server.

  1. Make a copy of the Grooper Repository's File Store folder.


  1. Paste the copied File Store to a location on the target server.

The (somewhat) trickier part is informing the Grooper Database this is the location of the file store (and not whatever it was on the source server). Next, we're going to edit the File Store's location path in the Grooper database from Microsoft SQL Server Management Studio.

4. Change the File Store Path

Next, we're going to go into the Grooper Database's Tree Node table and manually edit the File Store object's location path. This will update the Grooper Database in such a way that it will use the copied File Store on the target server, instead of the original File Store on the source server.

The SQL statement you will run takes the following form:

UPDATE [your_database_name].[dbo].[TreeNode]
SET [Properties] = '{"StoragePath": "\\\\server_name\\new_filestore_path"}'
WHERE [TypeName] = 'Grooper.FileStore'

Below, we will give you step by step instructions on how to apply this statement in SQL Management Studio, changing the Grooper File Store's path in the Grooper Database.

Generally speaking, it is ill-advised to update Grooper object properties directly in the database tables. The guidance we're about to give below is a very rare exception.


Open Microsoft SQL Management Studio.

  1. Expand the Databases folder.
  2. Select and expand the restored Grooper Database.
  3. Expand the Tables folder.
  4. Right-click the dbo.TreeNode table.
  5. Select Select Top 1000 Rows


  1. Add the following line to the end of the SELECT statement.
    • WHERE [TypeName] = 'Grooper.FileStore'
  2. Execute the query.
    • Press this button or hit F5 on your keyboard.
  3. This will bring up any File Store objects in the Results list.
    • Typically, you will only have one result, the "Primary" File Store. Atypically, you may have additional File Stores in your Grooper Repository, such as ones added for archival purposes. If that's the case, you'll need to copy over all File Stores and update their location paths.
  4. Select the value in the Properties column.
  5. Copy it.


Enter a couple blank lines at the end of the query.

  1. Type the following to the end of the query:

UPDATE [your database's name].[dbo].[TreeNode]
SET [Properties] = ''

  1. Paste the copied value in between the first ' and second '
    • The last line of the query should be as follows:
    • SET [Properties] = '{"StoragePath": "source storage path"}'
  2. Change the storage path from the original path to the target File Store's path.
    • After editing, the last line of the query will be as follows:
    • SET [Properties] = '{"StoragePath": "target storage path"}'


Please note any slash characters in the path must be escaped with a backslash.

  • So if your path is \\server_name\path you will enter \\\\server_name\\path
  • Furthermore, use ONLY fully qualified UNC paths.

Don't stop here! We still need a WHERE clause.

If you execute the statement without a WHERE clause, you will update the properties for all nodes in your Grooper Repository, effectively ruining it. But if you do, it's a good thing you have a backup to revert to!


  1. Enter the following line at the end of the query:
    • WHERE [TypeName] = 'Grooper.FileStore'
  2. Select the bottom three lines of the query.
    • From UPDATE to the end of the last WHERE clause.
  3. Execute the selected portion of the query.
    • Press this button or hit F5 on your keyboard.


  1. You should see the following message indicating "1 row affected". This means you successfully updated the File Store object's storage path.

At this point we've fully copied over the Grooper Database and File Store for the Grooper Repository from the source server. With a Grooper Database and File Store in place, this is effectively a Grooper Repository at this point. All we need to do now is establish a connection to it.

5. Create a Grooper Repository Connection

All that is left is to create a new Grooper Repository connection to the Grooper Database and File Store, just like we would connect to any other Grooper Repository using Grooper Command Console.

Open Grooper Command Console.

Use the following command:

connections add <server> <database> [user] [password]

Portions of the command in angled brackets are required, while portions in square brackets are not.

  • You will need to replace <server> with the appropriate hostname of your Grooper server.
  • You will need to replace <database> with the appropriate database name of your Grooper database.
  • [user] and [password] are only needed if you are passing explicit user credentials for authentication.
  1. Select the Repositories property.
  2. Press the ellipsis button at the end.

You've now successfully copied one Grooper Repository from one server to another and connected to it. Next, we're going to open the Grooper site and verify we've done our job correctly.

At this point be sure to refresh the App Pool in IIS for the Grooper website on your Grooper web server.

6. Verify Connection

Now, we should be able to open this Grooper Repository in Grooper and access and configure its objects like normal. Let's verify this.

Go to your Grooper website.

If you haven't set the copied/restored Grooper Repository as the default one, you'll need to select it.

  1. Select Repository in the top menu bar.
  2. Select the copied/restored Grooper Repository.


If you're able to switch to the Grooper Repository or otherwise load it in Grooper at all that's a good first sign. If you get an error message, likely the database backup was corrupted and you'll need to start all over at step 1.

Another good test is to select objects in the repository and verify their properties are loaded as expected.

  1. Here, we've selected a Content Model in the Node Tree on the "Design" page.
  2. It loads the Content Model's properties with no error and configured as they were on the source server.
    • This is another good sign there's nothing wrong with the Grooper Database backup.


Next, we need to verify there's nothing wrong with our Grooper Repository's File Store. For that, we'll need to select an object in the Node Tree of the "Design" page that has something in the file store associated with it, like a document or page in a Batch.

  1. Here, we've selected a test Batch in the Node Tree.
  2. I can see page object's thumbnails loaded and select a page object in the Batch.
  3. I can see the page's content load in the Document Viewer.

This is all a good indication the File Store was copied over correctly, and we correctly reassigned its storage path.


This is what it looks like when things go wrong.

  1. We've selected a test Batch in the Node Tree.
  2. The page objects' thumbnails do not load.
  3. If you try and select something, you're met with this error message.
    • Effectively, Grooper expects to find a file in the File Store. However, the file is not there. So, Grooper can't fetch the associated/referenced file for the selected object, giving us the error.

One of two things went wrong in this case. Either:

  • The wrong path was entered when we updated File Store's storage location in SQL Server Management Studio.
  • One or more files did not copy over correctly when we copied the source File Store.