From: Justin C on
I have a file /var/local/backup_excludes that lists directories that
contain files which I do not want to backup, the contents look like
this:

home/justin/tmp/tmp_img_dir/*
home/justin/.mozilla/*/Cache/*
home/ali/Cookies/*

And to backup I'm using the following:

tar --exclude-from=/var/local/backup_excludes -cf $tape home/ 2>> $logpath

The script that runs the backup does a "cd /" before it starts, so all
paths should be relative. I've been banging my head against this for a
while now and still can't solve it. I did have the --exclude-from...
part at the end of the line but found somewhere on the web that that was
incorrect. And formerly I didn't have the /* at the end of the paths
either, but that didn't work for me either.

This is a real PITA because I've done this in the past and had it
working, but I can't figure out now how!

Thank you for any help you can give with this.

Justin.

--
Justin C, by the sea.
From: Dave Farrance on
Justin C <justin.1007(a)purestblue.com> wrote:

>I have a file /var/local/backup_excludes that lists directories that
>contain files which I do not want to backup, the contents look like
>this:
>
>home/justin/tmp/tmp_img_dir/*
>home/justin/.mozilla/*/Cache/*
>home/ali/Cookies/*

/home ...
From: Dave Farrance on
Dave Farrance <DaveFarrance(a)OMiTTHiSyahooANDTHiS.co.uk> wrote:

>Justin C <justin.1007(a)purestblue.com> wrote:
>
>>I have a file /var/local/backup_excludes that lists directories that
>>contain files which I do not want to backup, the contents look like
>>this:
>>
>>home/justin/tmp/tmp_img_dir/*
>>home/justin/.mozilla/*/Cache/*
>>home/ali/Cookies/*
>
>/home ...

or depending on how it was created, it might contain ./home... so use:

*/home ...
From: Justin C on
On 2010-07-07, Dave Farrance <DaveFarrance(a)OMiTTHiSyahooANDTHiS.co.uk> wrote:
> Dave Farrance <DaveFarrance(a)OMiTTHiSyahooANDTHiS.co.uk> wrote:
>
>>Justin C <justin.1007(a)purestblue.com> wrote:
>>
>>>I have a file /var/local/backup_excludes that lists directories that
>>>contain files which I do not want to backup, the contents look like
>>>this:
>>>
>>>home/justin/tmp/tmp_img_dir/*
>>>home/justin/.mozilla/*/Cache/*
>>>home/ali/Cookies/*
>>
>>/home ...
>
> or depending on how it was created, it might contain ./home... so use:
>
> */home ...

Ah! OK. I will give that a try. cron will run it over-night and I'll see
how it got on tomorrow morning.

Looking again at what I'm backing up, I might do a "cd /home" first and
then backup "*" rather than "cd /" and backing up "home", I can then
change the paths in the exclude file to */justin/tmp_img_dir/* or
similar. I think that is more tidy.

Thank you for your reply, I'll let you know how I get on tomorrow.

Justin.

--
Justin C, by the sea.
From: Big and Blue on
On 07/07/10 16:36, Justin C wrote:
>
>
> Ah! OK. I will give that a try. cron will run it over-night and I'll see
> how it got on tomorrow morning.

A strange (to me) debugging tactic.

Why not create a much cut-down version that covers an example of what you
wish to do and run that now? In a few minutes. So that when the cron job
runs overnight you can have a high expectation that now it *will* do what
you require.


--
Just because I've written it doesn't mean that
either you or I have to believe it.