FAQ Search Today's Posts Mark Forums Read
» Video Reviews

» Linux Archive

Linux-archive is a website aiming to archive linux email lists and to make them easily accessible for linux users/developers.


» Sponsor

» Partners

» Sponsor

Go Back   Linux Archive > Ubuntu > Ubuntu User

 
 
LinkBack Thread Tools
 
Old 02-03-2008, 05:38 PM
Dubh Aingeal
 
Default Backup Script weird tar message

So I am working on a shell script to do a incremental backups. The
script basically makes a full monthly backup then once a week makes
another full back up with daily incremental backups. To limit the
storage amount of backups, the script rewrites the weekly/daily backups.
Eventually I want to add exclusions into it but that will be later
(unless someone has some suggestions now). When I run the script to
test it I get this message:

/bin/tar: Removing leading `/' from member names

I'm not sure whats causing it. I'm hoping some fresh eyes might see
where I made my error.

The script looks like this:

#!/bin/sh
# full and incremental backup script
#Change the 5 variables below to fit your computer/backup

COMPUTER=executioner # name of this computer
DIRECTORIES="/home/aingeal" # directories to backup
BACKUPDIR=/backups # where to store the backups
TIMEDIR=/backups/last-full # where to store time
of full backup
TAR=/bin/tar # name and
location of tar

#You should not have to change anything below here

PATH=/usr/local/bin:/usr/bin:/bin
DOW=`date +%a` # Day of the week e.g. Mon
DOM=`date +%d` # Date of the Month e.g. 27
DM=`date +%d%b` # Date and Month e.g. 27Sep

# Monthly full backup
if [ $DOM = "01" ]; then
NEWER=""
$TAR $NEWER -cf $BACKUPDIR/$COMPUTER-$DM.tar $DIRECTORIES
fi

# Weekly full backup
if [ $DOW = "Sun" ]; then
NEWER=""
NOW=`date +%d-%b`

# Update full backup date
echo $NOW > $TIMEDIR/$COMPUTER-full-date
$TAR $NEWER -cf $BACKUPDIR/$COMPUTER-$DOW.tar $DIRECTORIES

# Make incremental backup - overwrite last weeks
else

# Get date of last full backup
NEWER="--newer `cat $TIMEDIR/$COMPUTER-full-date`"
$TAR $NEWER -cf $BACKUPDIR/$COMPUTER-$DOW.tar $DIRECTORIES
fi

--
ubuntu-users mailing list
ubuntu-users@lists.ubuntu.com
Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/ubuntu-users
 
Old 02-03-2008, 05:50 PM
"Chris Mohler"
 
Default Backup Script weird tar message

On Feb 3, 2008 12:38 PM, Dubh Aingeal <ubuntu@dubh-aingeal.com> wrote:
> So I am working on a shell script to do a incremental backups. The
> script basically makes a full monthly backup then once a week makes
> another full back up with daily incremental backups. To limit the
> storage amount of backups, the script rewrites the weekly/daily backups.
> Eventually I want to add exclusions into it but that will be later
> (unless someone has some suggestions now). When I run the script to
> test it I get this message:
>
> /bin/tar: Removing leading `/' from member names

Check out the -C option in tar's manpage.

Also:
https://forum.bytemark.co.uk/viewtopic.php?id=850

Chris

--
ubuntu-users mailing list
ubuntu-users@lists.ubuntu.com
Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/ubuntu-users
 

Thread Tools




All times are GMT. The time now is 08:18 PM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.
Copyright 2007 - 2008, www.linux-archive.org