LinuxQuestions.org
Visit Jeremy's Blog.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
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


Reply
  Search this Thread
Old 09-17-2013, 10:27 AM   #1
Zippy1970
Member
 
Registered: Sep 2007
Posts: 119

Rep: Reputation: 17
Question 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)?
 
Old 09-17-2013, 01:18 PM   #2
unSpawn
Moderator
 
Registered: May 2001
Posts: 29,415
Blog Entries: 55

Rep: Reputation: 3608Reputation: 3608Reputation: 3608Reputation: 3608Reputation: 3608Reputation: 3608Reputation: 3608Reputation: 3608Reputation: 3608Reputation: 3608Reputation: 3608
Build clean guest, install / updates packages until it has the same status as the production host then rsync data?
 
Old 09-17-2013, 02:33 PM   #3
jefro
Moderator
 
Registered: Mar 2008
Posts: 22,361

Rep: Reputation: 3692Reputation: 3692Reputation: 3692Reputation: 3692Reputation: 3692Reputation: 3692Reputation: 3692Reputation: 3692Reputation: 3692Reputation: 3692Reputation: 3692
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.
 
Old 09-18-2013, 04:24 AM   #4
Zippy1970
Member
 
Registered: Sep 2007
Posts: 119

Original Poster
Rep: Reputation: 17
Quote:
Originally Posted by unSpawn View Post
[...] 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.
 
Old 09-18-2013, 04:27 AM   #5
Zippy1970
Member
 
Registered: Sep 2007
Posts: 119

Original Poster
Rep: Reputation: 17
Quote:
Originally Posted by jefro View Post
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).
 
Old 09-20-2013, 04:30 AM   #6
Zippy1970
Member
 
Registered: Sep 2007
Posts: 119

Original Poster
Rep: Reputation: 17
Anyone? Please?
 
Old 09-20-2013, 05:58 PM   #7
jefro
Moderator
 
Registered: Mar 2008
Posts: 22,361

Rep: Reputation: 3692Reputation: 3692Reputation: 3692Reputation: 3692Reputation: 3692Reputation: 3692Reputation: 3692Reputation: 3692Reputation: 3692Reputation: 3692Reputation: 3692
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.
 
Old 09-21-2013, 03:44 AM   #8
unSpawn
Moderator
 
Registered: May 2001
Posts: 29,415
Blog Entries: 55

Rep: Reputation: 3608Reputation: 3608Reputation: 3608Reputation: 3608Reputation: 3608Reputation: 3608Reputation: 3608Reputation: 3608Reputation: 3608Reputation: 3608Reputation: 3608
Quote:
Originally Posted by Zippy1970 View Post
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.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Duplicating a Linux System Disk rapidly (ie. ghosting a HDD) richearle Linux - General 1 08-02-2006 03:56 AM
ghosting linux Damon Spector Linux - General 16 05-29-2006 06:00 AM
Ghosting a system? Lleb_KCir Linux - General 8 11-06-2004 05:04 PM
Ghosting Linux PapaNoHair Linux - General 3 03-23-2004 06:42 PM
Partially hanged/freezed system Any0ne Linux - General 2 11-01-2003 06:51 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - General

All times are GMT -5. The time now is 12:02 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration