OK, I stopped dragging my feet and started using rsync. It looks like it will be exactly what I need. And I haven't even experimented with remote syncing -- just a local copy that I will burn to CDs. rsync, however, doesn't use grep matchings patterns, so I had to read the man to get it working with my exclusion list.

Thanks for the suggestion!

Richard

On Nov 19, 2003, at 12:25 PM, Michael L Torrie wrote:

On Wed, 2003-11-19 at 12:22, Richard Miller wrote:
That flag (-v) was the trick that I had overlooked for grep. Thanks!

Now as far as using that list of files to make backup copies, what
would be the best thing to do?

Consider using rsync, really. It does all you want to do and more. And
it's very very fast.


Michael


All that comes to mind right now is a PHP script:


#!/usr/bin/php
<?php
        $fh = fopen("includelist.txt","r");
        while ($source = fgets($fh))
        {
                copy($source, $destination);   // needs error checking
        }
        fclose($fh);

?>

But PHP doesn't seem like the best thing for this. What do you think?

Richard

On Nov 19, 2003, at 12:11 AM, Richard Esplin wrote:

grep -v will do an invert match, only returning the files that don't
contain
the specified strings. You could then send that list to cp to make your
backups (make sure to use the -p flag to preserve permissions).
But unison is a tool that will do exactly what you want. If you put
your list
of files in the ignore list in your preferences file, then unison will
never
touch them. unison has a lot of other features too, so perhaps it is
overkill
for your purposes.
Richard Esplin


On Tuesday 18 November 2003 23:24, Richard Miller wrote:
I want to backup my Home directory but there are some files that I
just
don't need to backup so I have compiled a list in "excludelist.txt".
I'm not a pro with Regular expressions, but I've learned that I can
type a command like this

$ find ~ | grep -f excludelist.txt

to show the all the files I want to exclude.

How do I, on the other hand, use the exclude list to show all of the
files I want to INCLUDE?


Actually, I don't know what I will do with a list of the files I want
to include, but there ought to be a way to backup those files once I
have a list. Am I heading in the right direction?


Thanks!

Richard Miller


____________________ BYU Unix Users Group http://uug.byu.edu/ ___________________________________________________________________ List Info: http://uug.byu.edu/cgi-bin/mailman/listinfo/uug-list


____________________
BYU Unix Users Group
http://uug.byu.edu/
___________________________________________________________________
List Info: http://uug.byu.edu/cgi-bin/mailman/listinfo/uug-list




____________________
BYU Unix Users Group
http://uug.byu.edu/
___________________________________________________________________
List Info: http://uug.byu.edu/cgi-bin/mailman/listinfo/uug-list
--
Michael L Torrie <[EMAIL PROTECTED]>

____________________
BYU Unix Users Group
http://uug.byu.edu/
___________________________________________________________________
List Info: http://uug.byu.edu/cgi-bin/mailman/listinfo/uug-list




____________________
BYU Unix Users Group http://uug.byu.edu/ ___________________________________________________________________
List Info: http://uug.byu.edu/cgi-bin/mailman/listinfo/uug-list

Reply via email to