Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

What to back up for new HD

Status
Not open for further replies.

optimised

Technical User
Jun 21, 2001
96
US
Hello,

I have a rh7.3 machine that I would like to upgrade the hard drive on. I basicly only run apache and dns for hosting my three sites and two friends. I don't have a cd burner or tape drive to this machine and I'm not a guru with linux at all. So I'm guessing the easiest way for me to back up my data files is to tar the following directories that I have put in this script and ftp to my lan pc to store until new drive is re-loaded.


#!/bin/bash
# This file should be saved as /root/backup,
# and be chmod 744 /root/backup

# the /opt directory is a little like /usr/local --
# it catches 'stuff' for the local machine rather than network

cd /opt/backup

echo 'currently in /opt/backup'
echo 'now creating tar files.'

tar zvcf etc.tgz /etc
tar zvcf named.tgz /var/named
tar zvcf home.tgz /home

echo 'List of the files created'
echo 'and dates they were made.'

ls -ltr /opt/backup

# end


1)Are there any directories I can be missing and is there a proper (untar) restore sequence?

2)After I restore the new drive I may want to run this script or a similiar one as cron job. Maybe every 48 hours or so. On rh what directory do I place the script to run by cron?

Thanks much
What's ctrl-alt-del = windows
 

1) That looks ok to me. Just untar the files you need.

2) Not really. Edit crontab with 'crontab -e' or 'vi /etc/crontab'

Cheers Henrik Morsing
Certified AIX 4.3 Systems Administration
& p690 Technical Support
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top