We are moving from ZENworks 7 to ZCM very shortly, and unfortunately for us what we used as our test environment for ZCM very quickly became the server we wanted to use (all the content was as we wanted it), except the hardware wasn’t! Short of re-converting all our applications again (a rather large and uninviting task), how do you move a primary server (including embedded database) from one place to another?
XEN Virtual machine
ZCM 10.1.1 using the embedded Sybase database
XEN virtual machine
ZCM 10.1.1 using the embedded Sybase database
Note: although the below should work with devices already connected to the ZCM server, this was done with no devices (other than the single primary server). We plan to have many peer-primary and satellite servers, but this is just getting things ready to roll.
So we had re-built all our applications, policies, etc on our test box – how do we move that all to the new server?
First step – backup everything required on the current machine:
- Copy the certificates used by ZCM somewhere.
We used an external certificate authority, so it was just a matter of copying/FTP’ing the three certificates (SSL certificate, SSL private key, and root CA key) off the test system. If you used an internal certificate authority have a look at ZENworks Server and Certificate Authority Backup and Restore documentation: http://www.novell.com/documentation/zcm10/zcm10_system_admin/index.html?page=/documentation/zcm10/zcm10_system_admin/data/bam65st.html
- Backup the database.
To manually create a backup of the database, at a command prompt:
- Store the admin password (so you don’t get prompted again):
- Zman admin-store-credential administrator
- Create some folders:
- Mkdir /root/zcm_backups
- Mkdir /root/zcm_backups/dbBackup
- Take a backup of the database
- Zman database-backup /root/zcm_backups/dbBackup
- You should end up with two files –
Copy/FTP them somewhere safe!
- Backup the ZENworks server. (server configuration and identity information)
At a command prompt (as root):
Zman zenserver-backup /root/zcm_backups/zone_backup.bak
Note: you will be prompted for an administrator username and password, then a passphrase (of at least 10 characters) – you’ll need the passphrase later on so write it down somewhere!)
Copy/FTP that file somewhere as well.
- Backup the content-repo.
There are many ways to do this, I used NFS to put the data in an intermediate location, ready to be copied back to the new server –
Edited /etc/exports (on the test ZCM server) and added this line:
Note: in my case /data had /data/content-repo under it, you could also just mount /data/content-repo directly if you wanted.
Started the NFS server:
Then on the intermediate machine:
Mount :/data /mnt/nfs
Cp –R /mnt/nfs/content-repo /tmp/content-repo
That should be all you need – you should now have (somewhere other than your ZCM server)
- the three certificate files (or whatever gets generated by the ZENworks certificate authority backup)
- the two database files
- the zenworks server .bak file
- a copy of the content-repo directory
The next step is to build the new server, install ZCM, and then import all the above data onto our new machine.
- Shutdown your test ZCM server. You need to use the same IP address and DNS name for the new system, so we don’t want IP conflicts?
- Install SLES10SP1 + patch up to date. I’ll leave those steps up to you – I assume you know how to do that.
- Before installing ZCM I copied the three certificate files onto the new machine.
And FTP’ed the files into that directory.
- Next I copied the ZCM ISO onto the machine, mounted and installed it.
Mount –o loop ZCM_10.1.0.iso
Although I’m not sure if it’s required, I used the same zone name as my previous install.
- Under XEN with SLES10SP1 64bit the zenagent fails to load – to fix follow this TID 7000913: ZENworks Agent Daemon fails to load on XEN 64bit guest OS.
- Logged into the ZCC and did a system update to 10.1.1
- Restore the ZENworks server.
Copy/FTP the zone backup made above to /root/zcm_backups, then:
Zman zenserver-restore /root/zcm_backups/zone_backup.bak
When prompted, enter a ZENworks administrator username and password.
When prompted, enter the passphrase you entered when creating the backup.
- Restore the database.
Copy/FTP the database backup you created earlier to /root/zcm_backups/dbBackup, then:
Change to /opt/novell/zenworks/bin, and enter the following command:
./ZenworksLinuxDBRestore.sh –F "/root/zcm_backup/dbBackup/zenworks_zone_name.db"
- Restore the content-repo.
Up to you how you do this, with NFS or from another backup.
You should now have a working ZENworks server again!
Pages of interest:
Server backup and restore forum discussion:
Disclaimer: As with everything else at Cool Solutions, this content is definitely not supported by Novell (so don't even think of calling Support if you try something and it blows up).
It was contributed by a community member and is published "as is." It seems to have worked for at least one person, and might work for you. But please be sure to test, test, test before you do anything drastic with it.