to tar.gz everything. There are some other backups though (in other folders), these are typically the only files > 50mb. How can i exclude them? Also, anyone know how i can exclude jpg/gif/pngs? thanks

This will work up to the point that the number of arguments to tar exceeds some limit. That is, when the output from find becomes large. Beyond that point, you need to bring the tar call into find's -exec arg.
–
EwanOct 23 '09 at 12:23

The tar documentation documents no such limitation on the size of the input to -T, so I have no idea what you're talking about really.
–
wdsOct 23 '09 at 12:28

If you're talking about the command line size limitation, that's not an issue here, as we're piping the output of find directly into tar.
–
wdsOct 23 '09 at 12:33

Alright. I cannot reproduce it with 183971 files. In fact, I remember now that when I saw this issue it was to do with xargs. I had to change a find that piped to xargs for a tar append call into a find with an inline exec call for tar.
–
EwanOct 23 '09 at 12:49

You can combine tar with find to select only the files of a certain size: find . -size -50M returns a list of all the files under 50 MB, which you can then pipe to tar.

Edit Didn't notice your second question when I first answered: in order to exclude files based on their extension, just pipe the output of find to grep: find ... | fgrep -v \*.jpg \*.png etc. (untested).

That being said, Artelius is right: what you want to exclude from your general backup is, I suppose, all the partial backups that you already made, so you may want to detected them by their file extension (tar.gz etc.), not their size.
–
Arthur ReutenauerOct 23 '09 at 12:16