Mailinglist Archive: opensuse-edu (31 mails)

< Previous Next >
selective archiving
  • From: Mike Rees <suse@xxxxxxxxxxxxxxxxxxxxx>
  • Date: Tue, 11 Mar 2003 14:02:28 +0000 (UTC)
  • Message-id: <Pine.LNX.4.10.10303111311280.19087-100000@xxxxxxxxxxxxxxxxxxxxxxxxxx>


Any idea how I can selectively backup certain type of files using tar (or
otherwise) For example, (don't shoot me for this) *.doc, *.xls, *.pub files.

I'm trying to backup users home directories which inevitably contain loads
of cr4p making the size of the archive balloon.

This is the kind of thing I'm using currently.
Obviously, repeated for each directory and filetype I want to backup.

tar -cvf backup /etc
/usr/bin/find /export/home/ -name *.doc -newer /etc/last.backup -exec tar
-rvf backup {} \;

The script is getting longer and longer as I add new filetypes.

Am I missing something obvious? Can I feed find or tar multiple arguments
ie the file types?

All help much's doing my head in!!

Mike Rees
Ysgol Glanymor School
Heol Elfed
Burry Port
SA16 0AL

< Previous Next >