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.
On the source server, open Microsoft SQL Server Management Studio.
Select the SQL Server hosting the Grooper Database.
Select Connect.
Expand the Databases folder.
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.
Select Tasks
Select Back Up...
This will bring up the Back Up Database configuration window for the selected database.
Ensure Back up to:Disk is selected.
Select Add...
In the following window, select the ellipsis button next to the file name property.
valign=top
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.
Name the backup file whatever you like, but ensure you add .bak to the end of the filename.
We've named ours RepoBackup.bak
Select OK when finished.
In the following window select OK.
You will see your .bak database backup file's location popup in the list.
Select OK to backup the database.
Upon successful creation of the backup file, you will see the following success message.
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.
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.
Select the destination SQL Server.
Select Connect.
Right-click the Databases folder.
Select Restore Database...
This will bring up the Restore Database configuration window.
Ensure Device is selected.
Press the ellipsis button at the end of the Device property.
On the following screen, select Add.
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 right panel to select the backup file.
Select OK when finished.
You will see your backup file pop up in the "Backup media" list.
Select OK to continue.
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.
Select OK to restore the database.
Success! The database is now restored on the current server.
Select OK in the success window to continue.
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.
Make a copy of the Grooper Repository's File Store folder.
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.