LinuxQuestions.org
Support LQ: Use code LQ3 and save $3 on Domain Registration
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 11-17-2012, 10:57 PM   #16
catkin
LQ 5k Club
 
Registered: Dec 2008
Location: Tamil Nadu, India
Distribution: Servers: Debian Squeeze and Wheezy. Desktop: Slackware64 14.0. Netbook: Slackware 13.37
Posts: 8,528
Blog Entries: 27

Rep: Reputation: 1176Reputation: 1176Reputation: 1176Reputation: 1176Reputation: 1176Reputation: 1176Reputation: 1176Reputation: 1176Reputation: 1176

rsync is relatively slow for populating entire file systems because it writes individual files and checksums them. The quickest way to populate an entire file system is to use a tool that restores a complete file system such as clonezilla (as already mentioned) or dd to the partition's device file.
 
Old 11-19-2012, 06:32 PM   #17
rootaccess
Member
 
Registered: Mar 2012
Posts: 211

Original Poster
Rep: Reputation: Disabled
Ok I spent a couple days researching this whole thing and basically learned that for home use, clonezilla works great. Ive done, I use it for that purpose. In the enterprise world, it doesn't work that way. Rsync is not a system backup or restore tool. Its good for incremental backups every night for only modified files in the last 24 hours, or large files. If an enterprise system were to crash, you just take the important data that you backed up using incremental backups with rsync and copy the files over AFTER you do a fresh install with kickstart using a long post-script section to automatically edit every file for that system. This of course should be saved somewhere anyway.

a simple example would be:
echo "tty1" > /etc/securetty

Others can get more complex with sed and grep

The idea is early on when you set up the enterprise network, you manually set up 1 client machine. You save the kickstart file, then populate the rest of the kickstarts with their corresponding hostnames and IPs with another script. Put all the kickstarts on an NFS mount like '192.168.0.101-kickstart' so on and so forth. Then spend a whole day and tweak the machine manually and write down what changes were made. You can then either write out sed commands for each change to be pasted in the post-script section or copy the exact files on to the server and copy them over to all the machines in the network if that is easier. Its all in /etc anyway. The latter works if you are new to an already existing enterprise network and a system had crashed.

Last edited by rootaccess; 11-19-2012 at 06:34 PM.
 
Old 11-19-2012, 08:15 PM   #18
catkin
LQ 5k Club
 
Registered: Dec 2008
Location: Tamil Nadu, India
Distribution: Servers: Debian Squeeze and Wheezy. Desktop: Slackware64 14.0. Netbook: Slackware 13.37
Posts: 8,528
Blog Entries: 27

Rep: Reputation: 1176Reputation: 1176Reputation: 1176Reputation: 1176Reputation: 1176Reputation: 1176Reputation: 1176Reputation: 1176Reputation: 1176
Regards "tweak the machine manually and write down what changes were made", one way is to back up every file before changing it with a rare extension, for example .org (short for original). When the tweaking is complete you can use find to do a context diff on all the .org files and store the output somewhere safe

If a restore is required the context diffs can be used to replicate all the changes.
 
Old 11-25-2012, 03:23 AM   #19
rootaccess
Member
 
Registered: Mar 2012
Posts: 211

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by catkin View Post
Regards "tweak the machine manually and write down what changes were made", one way is to back up every file before changing it with a rare extension, for example .org (short for original). When the tweaking is complete you can use find to do a context diff on all the .org files and store the output somewhere safe

If a restore is required the context diffs can be used to replicate all the changes.
Just wanted to say good point. The way I would do it would always be to create the backup file automatically with each file using the -i.bak option with sed as I would use sed for pretty much all my backups or at least I would use it first before I piped it into grep or awk.

Now that I would have a backup of all the files I created, I would want to know all the files I edited and have at least that information stored somewhere. So I would run a find command only on the files that have been modified in the last n minutes. Usually the post script section should take a couple minutes max so I could run a command to check for the files in /etc edited in the last 10 minutes or so and then send those files to the root directory of that machine for example or maybe to a remote machine, whatever I may desire...

Code:
find /etc/* -mmin -10 -exec cp {} /root/etc \;
But the diff you mentioned can work great to see the actual changes of the files which can be very useful. thanks for that note.

Last edited by rootaccess; 11-25-2012 at 03:33 AM.
 
  


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
restoring an rsync backup Cultist Linux - Software 1 07-10-2011 08:18 AM
rsync backup system baronsam Linux - Software 9 05-22-2010 10:57 AM
Question about restoring a backup in a different system tirengarfio Linux - Newbie 7 01-21-2010 04:54 PM
Restoring from rsync backup a_l_a_n Linux - Software 3 09-12-2007 01:13 PM
Restoring from an rsync backup of / eldoran Linux - General 3 04-25-2006 11:34 PM


All times are GMT -5. The time now is 06:52 AM.

Main Menu
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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration