Le Mar 21 octobre 2008 11:41, Arnau a écrit : > I'd like to mirror all the packages installed in a production server > with the same versions. The idea is to have a enviroment test the > upgrades before apply those upgrades to the real production server. What > is the best way to do this?
Hi, You certainly already have a SSH server running on the production server. If you can have a root ssh connexion (without password, only with key challenge), I can see two solutions by booting the test server with a LiveCD : - you can reformat the test server's filesystem, mount it and run the following command : ssh [EMAIL PROTECTED] "tar cf - /" | (cd TestServerFSMountPoint ; tar xvf - ) - you can only update the test server's FS with rsync, you mount it and run something like : rsync -av --delete [EMAIL PROTECTED]:/ /TestServerFSMountPoint Don't forget to update the files in /etc. You have to change all the IP and host occurences : - grep -r www.xxx.yyy.zzz /etc - grep -r productionserver /etc You can certainly automate the changes with the following commands : - grep -r www.xxx.yyy.zzz /etc | cut -d: -f1 | xargs sed -i 's/www.xxx.yyy.zzz/aaa.bbb.ccc.ddd/g' - grep -r productionserver /etc | cut -d: -f1 | xargs sed -i 's/productionserver/testserver/g' Fanfan -- http://www.cerbelle.net - http://www.afdm-idf.org -- To UNSUBSCRIBE, email to [EMAIL PROTECTED] with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]