How can I copy the groups and computers from my old Ghost Solution Suite Server to my new Ghost Solution Suite Server?
GSS 3.x
The SQL query below is an example of how to complete this. The first script will be used to create the groups on the new server. The second script will be used to add the computers to the proper groups. This example assumes both Ghost Solution Suite express Databases are housed within the same SQL server.
neweXpress: Represents the name of the eXpress database the new Ghost Solution Suite Server is connected to and must be changed appropriately.
oldeXpress: Represents the name of the eXpress database the old Ghost Solution Suite Server is connected to and must be changed appropriately.
-- Begin script to recreate the groups
-----------------------------
INSERT INTO neweXpress.dbo.computer_group
SELECT *
FROM oldeXpress.dbo.computer_group
WHERE (group_id NOT IN
(SELECT group_id
FROM neweXpress.dbo.computer_group))
-----------------------------
-- End script to recreate the groups
-- Begin script to move the computers into the correct groups
----------------------------------------------------
UPDATE neweXpress.dbo.computer
SET group_id= oldeXpress.dbo.computer.group_id, name= oldeXpress.dbo.computer.name
FROM neweXpress.dbo.computer INNER JOIN oldeXpress.dbo.computer
ON neweXpress.dbo.computer.computer_name = oldeXpress.dbo.computer.computer_name
WHERE oldeXpress.dbo.computer.group_id IS NOT NULL
----------------------------------------------------
-- End script to move the computers into the correct groups
The computers and groups will now show up in the new Ghost Solution Suite Server
The computers listed in the new Ghost Solution Suite Server will not be able to have jobs sent to them until the DAgentt has been pointed to the new server for each of the computers.