Linode Forum
Linode Community Forums
 FAQFAQ    SearchSearch    MembersMembers      Register Register 
 LoginLogin [ Anonymous ] 
Post new topic  Reply to topic
Author Message
PostPosted: Mon Oct 17, 2005 9:39 am 
Offline
Junior Member

Joined: Mon Nov 01, 2004 4:36 pm
Posts: 21
Hi Folks,

I've recently discovered the wonders of QEMU as a way to run an emulated server on my laptop. One of the best uses I can think of for this is to run an exact copy of my production Linode server that I can use for staging changes - new software installs and configurations mostly. I'm using Debian Sarge.

Can anyone help me out with a way to synchronize the package lists between my linode and another server (my staging server) so that I can be sure anything I'm testing in one will work in the other?

I've been thinking about using rsync, but I know there are some directories I'd want to avoid (/proc, /dev, etc. - anyone know of a comprehensive list so that I could safely use rsync to synchronize the servers?).

Thanks, Tom


Top
   
 Post subject:
PostPosted: Wed Oct 19, 2005 5:06 am 
Offline
Senior Member

Joined: Sat Dec 13, 2003 12:39 pm
Posts: 98
I'm assuming you want to get your staging system installed with the packages and options you want for your production server, then magically cause the production server to adopt the new packages and options.

I'm thinking rsync isn't the way to go to for this. The interdependencies are such that copying files basically in random order, as rsync would do, could be very bad for running programs that access those files. You could set something up to stop running programs that depend on changed files, etc, but you would basically end up making your own package manager.

You might consider messing around with I think /var/cache/debconf/config.dat. I believe it's posisble to preload package installation options there. You might be able to copy that from your staging server version to at least get the package installation options over. Might be better ways to do that, but I think that works. If you ever change package options on the production server independent of the staging server, you'd have to reconcile the differences.

After you get the default installation options transferred, it might be simplest just to install all staging server packages to the production server. If a package is already loaded, it won't hurt to have it try to install it again, it will just say it can't be upgraded or something.

You might be able to use the rsync method if you shut down your production linode, mount its file system under another running configuration, rsync that, then restart it. But I assume you want to avoid shutting down your production server and then waiting for an rsync to complete.

Good luck.


Top
   
 Post subject:
PostPosted: Wed Oct 19, 2005 8:40 am 
Offline
Junior Member

Joined: Mon Nov 01, 2004 4:36 pm
Posts: 21
Thanks for the thoughts.

I think you may be right - I was kind of hoping I could just rsync everything except for /dev /proc and a few others, and voila, I'd have a mirror of my production server that I could play around with. But you're right, there are probably other issues to think of.

At the moment, what I've done is used dpkg --get-selections to get all the installed packages, and then loaded those into my staging server. And I'm using rsync wrapped in a script to synchronize some other files.

I think it will be a work in progress, but I'll keep working on it. And yes, I would prefer to avoid bringing the server down!

Thanks, Tom


Top
   
Display posts from previous:  Sort by  
Post new topic  Reply to topic


Who is online

Users browsing this forum: dobriain and 2 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
Jump to:  
RSS

Powered by phpBB® Forum Software © phpBB Group