duplicity-talk
[Top][All Lists]
Advanced

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

Re: [Duplicity-talk] Include only files from specified dir


From: AJ Weber
Subject: Re: [Duplicity-talk] Include only files from specified dir
Date: Sat, 2 Jan 2010 19:03:30 -0500

This works for what I need.  Thank you very much for the help.

I was thinking I could do a "find /dir -maxdepth 1 -type f" and pass that to the filelist, but this works fine.

-AJ

On Jan 1, 2010, at 10:50 PM, Jacob Godserv <address@hidden> wrote:

On Fri, Jan 1, 2010 at 20:33, AJ Weber <address@hidden> wrote:
Ok, I've tried a few command-lines with bad results.

I want to include only the regular files in a dir (no directories or
sub-directories).  Can someone help with example syntax?

duplicity /local/dir protocol://some.com/remote/dir --exclude
/local/dir/a/folder/*/* --include /local/dir/a/folder/*

The last include is only necessary if the files in
/local/dir/a/folder/ have any chance of being excluded. If duplicity
gives you an error about that last include, just delete it and it
should be fine.

Note that this will still back up the directories themselves, but it
won't dive into them. Duplicity doesn't differentiate between
directory and file in the include and exclude options. I ran a test:

~ $ find test/
test/
test/regfile2
test/regfile1
test/dir2
test/dir2/no3
test/dir2/no4
test/dir1
test/dir1/no2
test/dir1/no1

The goal is to not back up dir1 and dir2. I executed:

~ $ duplicity -v5 /home/jacob/test file:///home/jacob/test_store/
--exclude '/home/jacob/test/*/*'
[snip]
~ $ duplicity file:///home/jacob/test_store/ test_restore
[snip]

When I check out the contents of test_restore, I find nearly what you wanted:
~ $ find test_restore/
test_restore/
test_restore/regfile2
test_restore/regfile1
test_restore/dir2
test_restore/dir1

Does this help?

--
   Jacob

   "For then there will be great distress, unequaled
   from the beginning of the world until now — and never
   to be equaled again. If those days had not been cut
   short, no one would survive, but for the sake of the
   elect those days will be shortened."

   Are you ready?


_______________________________________________
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]