2022:Backup and Restore Grooper Repository: Difference between revisions
Dgreenwood (talk | contribs) No edit summary |
Dgreenwood (talk | contribs) No edit summary |
||
| Line 52: | Line 52: | ||
[[File:2022-backup-restore-repo-04.png]] | [[File:2022-backup-restore-repo-04.png]] | ||
|- | |- | ||
|valign=top | |valign=top| | ||
<br> | <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. | ||
| Line 201: | Line 201: | ||
|} | |} | ||
</tab> | </tab> | ||
<tab name="4. Change the File Store Path" style="margin:20px"> | |||
=== 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. | |||
{|cellpadding="10" cellspacing="5" | |||
|-style="background-color:#f89420; color:white" | |||
|style="font-size:22pt"|⚠||Generally speaking, it is ill-advised to update Grooper object properties directly in the database tables. | |||
The guidance we're about to give is a rare exception. | |||
|} | |||
{|cellpadding=10 cellspacing=5 | |||
|valign=top style="width:40%"| | |||
<br> | |||
Open Microsoft SQL Management Studio. | |||
# Expand the '''Databases''' folder. | |||
# Select and expand the restored Grooper Database. | |||
# Expand the '''Tables''' folder. | |||
# Right-click the '''dbo.TreeNode''' table. | |||
# Select ''Select Top 1000 Rows'' | |||
|valign=top| | |||
[[File:2022-backup-restore-repo-21.png]] | |||
|- | |||
|valign=top| | |||
<br> | |||
# Add the following line to the end of the SELECT statement. | |||
#* <code>WHERE [TypeName] = 'Grooper.FileStore'</code> | |||
# Execute the query. | |||
#* Press this button or hit <code>F5</code> on your keyboard. | |||
# 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. | |||
# Select the value in the '''''Properties''''' column. | |||
# Copy it. | |||
|valign=top| | |||
[[File:2022-backup-restore-repo-22.png]] | |||
|- | |||
|valign=top| | |||
<br> | |||
Enter a couple blank lines at 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">SET [Properties] = <nowiki>''</nowiki></code> | |||
#<li value=2> Paste the copied value in between the first <code>'</code> and second <code>'</code> | |||
#* The last line of the query should be as follows: | |||
#* <code>SET [Properties] = '{"StoragePath": "</code><code>'''''source storage path'''''</code><code>"}'</code> | |||
# 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: | |||
#* <code>SET [Properties] = '{"StoragePath": "</code><code>'''''target storage path'''''</code><code>"}'</code> | |||
Please note any slash characters in the path must be escaped with a backslash. | |||
* So if your path is <code>\\server_name\path</code> you will enter <code>\\\\server_name\\path</code> | |||
* Furthermore, use '''''ONLY''''' fully qualified UNC paths. | |||
|valign=top| | |||
[[File:2022-backup-restore-repo-23.png]] | |||
|- | |||
|valign=top| | |||
<br> | |||
# Enter the following line at the end of the query: | |||
#* <code>WHERE [TypeName] = 'Grooper.FileStore'</code> | |||
# Select the bottom three lines of the query. | |||
#* From <code>UPDATE</code> to the end of the last <code>WHERE</code> clause. | |||
# Execute the selected portion of the query. | |||
#* Press this button or hit <code>F5</code> on your keyboard. | |||
|valign=top| | |||
[[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. | |||
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. | |||
|valign=top| | |||
[[File:2022-backup-restore-repo-25.png]] | |||
|} | |||
</tab> | |||
<tab name="5. Create a Grooper Repository Connection" style="margin:20px"> | |||
=== 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. | |||
{|cellpadding=10 cellspacing=5 | |||
|valign=top style="width:40%"| | |||
<br> | |||
Open Grooper Config. | |||
# Select the '''''Repositories''''' property. | |||
# 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. | |||
|valign=top| | |||
[[File:2022-backup-restore-repo-28.png]] | |||
</tabs> | </tabs> | ||
Revision as of 14:50, 29 March 2022
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:
- Backup the Grooper Database on the source server using SQL Server Management Studio.
- Restore the Grooper Database backup on the target server as a new database using SQL Server Management Studio.
- 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.
- Create a new Grooper Repository connection on the target server, connecting to the restored Grooper Database on the target server in Grooper Config.
- Verify objects and files are accessible in new Grooper Repository connection.
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 and any Grooper applications (Grooper Design Studio, Grooper Config, etc) are closed.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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.
|
|
|
|
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.
| ⚠ | Generally speaking, it is ill-advised to update Grooper object properties directly in the database tables.
The guidance we're about to give is a rare exception. |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<tab name="5. Create a Grooper Repository Connection" style="margin:20px">
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.
|
|
|
|
|
|
|
|
|



























