Migrating the SGD ENS Datastore
By Fat Bloke on Jul 12, 2007
If you read the previous blogs about using the command line, you may think that by using the "tarantella object list_contents" and "tarantella object list_attributes" commands then you can simply walk the ENS datastore tree and archive the contents. And then use the "tarantella object new" commands to import them into a new SGD server. Well, you could but here's another way:
- Stop the SGD server
# tarantella stop; sleep 30; tarantella stop --kill
- Create an archive of the desired ENS.
# cd /<install-dir>/varNote: <install-dir> Is a placeholder, indicating the installation directory. The default for SGD is /opt/tarantella. CPIO implementations differ based upon version and platform. Below are two example commands. Please choose the one most appropriate with your environment, and verify correctness via man page.
LINUX # find ens | cpio -ocv -C 1024 -F /tmp/sgd_ens.cpio Solaris # find ens | cpio -ocv -C 1024 -O /tmp/sgd_ens.cpioThis file, '/tmp/sgd_ens.cpio' may now be copied to the target server that you'd like to restore it on.
- If you are planning to restore or migrate this ENS over a 'fresh' SGD install that maintains the default application objects, it may be beneficial to save the existing DNS for future troubleshooting. To do so:
# cd <install-dir>/var # mv ens ens.<SGD version>.default
- With the original ENS archived, and the SGD server stopped, you will now want to restore the archive in the same <install dir>/var/ directory
# cd <install-dir>/var
LINUX # cpio -icdumv < /tmp/sgd_ens.cpio Solaris # cpio -icdumv < /tmp/sgd_ens.cpio
- Once the transplanted ENS has been restored on the server, it is necessary to remove ens/.object file. This forces SGD to 'reindex' the ENS on it's next startup.
# rm <install dir>/var/ens/.object
- Start the server:
# tarantella start