Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place. |
Notices |
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
|
 |
09-17-2013, 10:27 AM
|
#1
|
Member
Registered: Sep 2007
Posts: 119
Rep:
|
Partially ghosting a linux system
I want to make a virtual clone of my production server so I can do some testing without the chance of messing up the actual server. I mainly want to try out stuff like a dist-upgrade, or updates of installed packages etc. I don't have physical access to the server (well, I do, but it's a 3 hour drive) so I need to be able to make an image and download it over my internet connection.
The server hosts a few directories with a huge amount of images of which I already have a local copy so I don't want to include those in the disk-image.
The clone is going to run on a virtual PC.
So what would be the best way to make such a disk-image (keep in mind that I want to be able to exclude certain directories from the image)?
|
|
|
09-17-2013, 01:18 PM
|
#2
|
Moderator
Registered: May 2001
Posts: 29,415
|
Build clean guest, install / updates packages until it has the same status as the production host then rsync data?
|
|
|
09-17-2013, 02:33 PM
|
#3
|
Moderator
Registered: Mar 2008
Posts: 22,361
|
It is common to clone a system without some folders. As to the method, that would be your choice.
In most cases, linux doesn't care about being cloned as long as there is support. Cloning of systems running databases and other apps need special consideration.
It is also a common task to create a golden or reference image to run as unSpawn suggests.
|
|
|
09-18-2013, 04:24 AM
|
#4
|
Member
Registered: Sep 2007
Posts: 119
Original Poster
Rep:
|
Quote:
Originally Posted by unSpawn
[...] install / updates packages until it has the same status as the production host [...]
|
That's not as easy as it may seem since the production server is already running quite a few custom compiled packages.
|
|
|
09-18-2013, 04:27 AM
|
#5
|
Member
Registered: Sep 2007
Posts: 119
Original Poster
Rep:
|
Quote:
Originally Posted by jefro
It is common to clone a system without some folders. As to the method, that would be your choice.
|
I was hoping I could do something as simple as a "tar". Can I?
Quote:
Cloning of systems running databases and other apps need special consideration.
|
Yes, it's running databases (MySQL).
|
|
|
09-20-2013, 04:30 AM
|
#6
|
Member
Registered: Sep 2007
Posts: 119
Original Poster
Rep:
|
Anyone? Please? 
|
|
|
09-20-2013, 05:58 PM
|
#7
|
Moderator
Registered: Mar 2008
Posts: 22,361
|
Tar may or may not correctly copy a running database. I'd think you'd need to stop the service and then tar it or rsync it. There are many web pages on how to do that usually.
Tar in general is a very old and trusted tool that compacts a single file or any number of groups of files. One generally further tries to compress it for storage via some pipe.
|
|
|
09-21-2013, 03:44 AM
|
#8
|
Moderator
Registered: May 2001
Posts: 29,415
|
Quote:
Originally Posted by Zippy1970
Anyone? Please? 
|
I'd say check the MySQL documentation as it shows you how to make backups. And I'd still argue rsync trumps tar when it comes to efficiently mirroring (whole, sparse, partial) files taking into account permissions, ownership and extended attributes and making use of compression (default) and bandwidth limiting and offering log files and statistics. But it's your choice, well-informed or not.
|
|
|
All times are GMT -5. The time now is 12:02 PM.
|
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.
|
Latest Threads
LQ News
|
|