Mailinglist Archive: opensuse (3336 mails)

< Previous Next >
Re: [SLE] Tar backup question
  • From: "Matt Stamm" <mattsl@xxxxxxxxx>
  • Date: Fri, 23 Dec 2005 13:30:23 -0800
  • Message-id: <200512231330.AA171835724@xxxxxxxxx>
---------- Original Message ----------------------------------
From: Art Fore <art.fore@xxxxxxxxxxx>
Date: Thu, 22 Dec 2005 16:10:05 -0800

>I have my system back up now and want to back it up. I would like to
>backup the full disk with tar except for the /tmp /media /proc /dev
>directories to a usb drive /media/SEAGATE.
>Could someone please write me the EXACT sytax to do this? The last time
>I tried this, I ended up filling up the disk I was backing up with
>nothing on the /media/SEAGATE drive even though I though I was following
>the help on tar I found on the internet.
>Check the headers for your unsubscription address
>For additional commands send e-mail to suse-linux-e-help@xxxxxxxx
>Also check the archives at
>Please read the FAQs: suse-linux-e-faq@xxxxxxxx


I've been using tar to backup parts of my system
for some time. I backup to a separate hard drive
That I installed for backups only. I'm no tar
expert but I'll post the script (see below), along
with two file, the first indicating what gets
backed-up, and a second indicating what to exclude
(I'm not using that right now, but it's commented
in the script)

Maybe it will help.

Matt Stamm

------- tar script ---->>>


# mount backup partition
mount /dev/hdd1 /mnt/backup

# create log and tar file names
today=`date +%Y-%m-%d`

# record starting time
echo "Start..." > $logfile
date >> $logfile
echo "" >> $logfile

# create tar
# to exclude: --exclude-from=/root/backup/exclude_files \
tar \
--create \
--verbose \
--gzip \
--file=$tarfile \
--files-from=/root/backup/backup_files \
>> $logfile

# record ending time
echo "Done..." >> $logfile
date >> $logfile

# un-mount the backup partition
umount /dev/hdd1

----- backup_files (file) ---->>


----- exclude_files (file) ---->>


< Previous Next >
This Thread
  • No further messages