We help IT Professionals succeed at work.

How to back up a linux box to a single file

mickt
mickt asked
on
325 Views
Last Modified: 2013-12-16
How can I back up my linux server to a single file.  I'd like then to be able to use this backup file for kickstart.  What I'm looking for is a Linux method similar to Solaris10 flash archive and jumpstart.
Comment
Watch Question

Top Expert 2008
Commented:
This one is on us!
(Get your first solution completely free - no credit card required)
UNLOCK SOLUTION
Top Expert 2008

Commented:
CERTIFIED EXPERT
Most Valuable Expert 2015
Commented:
This one is on us!
(Get your first solution completely free - no credit card required)
UNLOCK SOLUTION

Author

Commented:
There is only one disk in the system.
CERTIFIED EXPERT
Most Valuable Expert 2015

Commented:
A disk on a linux system is usually partitioned.
Commented:
This one is on us!
(Get your first solution completely free - no credit card required)
UNLOCK SOLUTION
This one is on us!
(Get your first solution completely free - no credit card required)
UNLOCK SOLUTION

Author

Commented:
Dump and restore are on my system.  If I use dump, can I use the created file during kickstart, i.e. automate recovery?

Commented:
man dump

I have no RHEl now...
This one is on us!
(Get your first solution completely free - no credit card required)
UNLOCK SOLUTION

Commented:
Yes, you are right, but that is the simpliest method.
I find a documents of RHEL Bakcups.
http://www.redhat.com/docs/manuals/linux/RHL-8.0-Manual/admin-primer/s1-disaster-backups.html

So you should plan you strategies, create backups. If you want to restore your server you should use rescue cd which bott the server and helps to start recovery procedure.

Author

Commented:
I've given it some thought and I suppose the best method is to use tar/gtar to create a single tgz file of all directories I wsh to backup. What would be the correct format in the ks.cfg post section to copy this file and restore the directories on the new system.

Author

Commented:
For clarification:

KS & NFS Server = 10.10.11.6 - backed up directories in single backup.tgz file (in NFS directory)
KS Client = 10.10.11.161

I have already included group and user definition for backed-up directories in post section of ks.cfg. i.e.
%post
groupadd adaptive
useradd -g adaptive -d /home/adaptive -c "Adaptive User" -p adaptive adaptive
useradd -g adaptive -d /home/mick -c "Adaptive User" -p password mick

Author

Commented:
I added the following in the post section and it works fine except for the setting of user passwords.

%post
groupadd adaptive
useradd -g adaptive -d /home/adaptive -c "Adaptive User" -p $1$qrtoMkyF$jlIuNBC/d7mvMW49QWCok/ adaptive
useradd -g adaptive -d /home/mick -c "Adaptive User" -p $1$p2Ugw4Nf$V7dhkg0B/TrcksZ5bln9/0 mick
mkdir /tmp/mnt
mount 10.10.11.6:/opt/kickstart/client_files/KStest /tmp/mnt
cp /tmp/mnt/backup.tgz /
gtar xzvf /backup.tgz
umount /tmp/mnt
rm -rf /tmp/mnt
reboot

Author

Commented:
Placing the encrypted password between single quotes did the trick.

Thanks for the assistance guys.

Gain unlimited access to on-demand training courses with an Experts Exchange subscription.

Get Access
Why Experts Exchange?

Experts Exchange always has the answer, or at the least points me in the correct direction! It is like having another employee that is extremely experienced.

Jim Murphy
Programmer at Smart IT Solutions

When asked, what has been your best career decision?

Deciding to stick with EE.

Mohamed Asif
Technical Department Head

Being involved with EE helped me to grow personally and professionally.

Carl Webster
CTP, Sr Infrastructure Consultant
Empower Your Career
Did You Know?

We've partnered with two important charities to provide clean water and computer science education to those who need it most. READ MORE

Ask ANY Question

Connect with Certified Experts to gain insight and support on specific technology challenges including:

  • Troubleshooting
  • Research
  • Professional Opinions
Unlock the solution to this question.
Join our community and discover your potential

Experts Exchange is the only place where you can interact directly with leading experts in the technology field. Become a member today and access the collective knowledge of thousands of technology experts.

*This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.

OR

Please enter a first name

Please enter a last name

8+ characters (letters, numbers, and a symbol)

By clicking, you agree to the Terms of Use and Privacy Policy.