To copy a server on a new location, you need at least to keep the configuration applied by your server.
You need to keep :
- Rules
- Directives
- Groups
- Techniques
If you keep your actual nodes, you also have to handle with CFEngine keys. New nodes won’t have problems with the new server.
If your new server has a different IP, you will have to change it on your nodes.
You will have to accept nodes
There are multiple ways to migrate your server, here are the best we propose you.
The simplest way to migrate your server to a new one is to copy /var/rudder/configuration-repository from your former server to the new one. In this folder you will find all your Rules/Groups/Directives/Techniques are stored. By copying that folder you will keep the git tree used by your server and keep your comments.
-
Copy
/var/rudder/configuration-repository
to your new server - In Rudder UI Go to Administration > Policy Server
- Reload the Technique Library
- Go to Administration > Archives
- In Global Archive, "Choose an archive" select Latest git commit
- Click on Restore everything
- After deployement, your configuration should be restored
Alternatively, you can follow the Archive/Import procedures described in Archives
If your server has changed of IP address you have to modify /var/rudder/cfengine-community/policy_server.dat
with the new address
Then you force your nodes to send their inventory while running /var/rudder/cfengine-community/bin/cf-agent -KI -D force_inventory
In your Rudder UI, you should now be able to accept the nodes.
Your configuration is now totally migrated.