duplicity-talk
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Duplicity-talk] using the 'find' command to exclude files over a ce


From: Jason Martin
Subject: Re: [Duplicity-talk] using the 'find' command to exclude files over a certain file size
Date: Fri, 14 Jan 2011 12:59:36 +0000

I'm using bash v4.1-3 but...

I managed to get it to work from your suggestion to use a formatted file!! 

I used..
find /home/jason -size +100M -printf "%p\n" \
| while read FILE; do
FILE=${FILE// /\\ } # subsitute whitespace with "\ "
echo "$FILE" >> /tmp/filelist
done

to generate a exclude filelist, then used to --exclude-filelist option.

My script is here https://gist.github.com/779568 if your interested.


Thanks for your help!!! I very much appreciate it
Jason 





On 14 January 2011 12:44, Jason Martin <address@hidden> wrote:
I'm using version 0.6.09-5 from the Debian repository

if I stick echo in front of the command it gives a huge command with about 30 excluded files. The output format is like this...
duplicity --exclude '**file1.iso' --exclude '**file2.avi' ...etc /home/jason file:///tmp/test

If i copy/paste that back into the terminal it works as it should, though I agree with you that it would be better with the full path rather than just the filename.

For some reason i don't think duplicity is seeing the output of the find command. so will use find to generate a temparary file and then use --exclude-filelist option.

Thanks
Jason 





On 14 January 2011 12:16, <address@hidden> wrote:
first i think you'd be better off with a generated globbing list to circumvent weird characters, see http://duplicity.nongnu.org/duplicity.1.html#sect9
i suggest to create an exclude file formatted like

/abs/path/to/file1
/abs/path/to/file2
...'

this way really only these files get excluded, but not all with a path ending in 'file' as before with '**file'

still please run your command again with an 'echo' in front of it and post the output. also which duplcity version are you using?

ede/duply.net

On 14.01.2011 12:52, Jason Martin wrote:
> Hello, I hope someone could help me. I am trying to exclude files over a
> certain size in a backup as they are mostly files that don't require backing
> up.
>
>
> I'm using the command:
> ~:$  duplicity $(find /home/jason -size +100M -printf " --exclude '**%f'")
> /home/jason/ file:///tmp/test
> which gives....
> Command line error: Expected 2 args, got 6
> Enter 'duplicity --help' for help screen.
>
>
> However,  if I copy/paste the output of $(find /home/jason -size +100M
> -printf " --exclude '**%f'") into the command everything works as
> expected...??
>
> Any ideas???
> *Jason*
>
>
>
>
> _______________________________________________
> Duplicity-talk mailing list
> address@hidden
> http://lists.nongnu.org/mailman/listinfo/duplicity-talk


_______________________________________________
Duplicity-talk mailing list
address@hidden
http://lists.nongnu.org/mailman/listinfo/duplicity-talk



reply via email to

[Prev in Thread] Current Thread [Next in Thread]