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.
 |
GNU/Linux Basic Guide
This 255-page guide will provide you with the keys to understand the philosophy of free software, teach you how to use and handle it, and give you the tools required to move easily in the world of GNU/Linux. Many users and administrators will be taking their first steps with this GNU/Linux Basic guide and it will show you how to approach and solve the problems you encounter.
Click Here to receive this Complete Guide absolutely free. |
|
 |
|
11-17-2012, 10:57 PM
|
#16
|
|
LQ 5k Club
Registered: Dec 2008
Location: Tamil Nadu, India
Distribution: Debian Squeeze (server), Slackware 13.37 (netbook), Slackware64 14.0 (desktop),
Posts: 8,357
|
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.
|
|
|
|
11-19-2012, 06:32 PM
|
#17
|
|
Member
Registered: Mar 2012
Posts: 169
Original Poster
Rep: 
|
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.
|
|
|
|
11-19-2012, 08:15 PM
|
#18
|
|
LQ 5k Club
Registered: Dec 2008
Location: Tamil Nadu, India
Distribution: Debian Squeeze (server), Slackware 13.37 (netbook), Slackware64 14.0 (desktop),
Posts: 8,357
|
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.
|
|
|
|
11-25-2012, 03:23 AM
|
#19
|
|
Member
Registered: Mar 2012
Posts: 169
Original Poster
Rep: 
|
Quote:
Originally Posted by catkin
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.
|
|
|
|
| Thread Tools |
Search this Thread |
|
|
|
Posting Rules
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is Off
|
|
|
All times are GMT -5. The time now is 06:50 AM.
|
|
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
|
|