selective backup script in bash

Posted by Sake on Server Fault See other posts from Server Fault or by Sake
Published on 2010-04-25T14:21:42Z Indexed on 2010/04/25 14:23 UTC
Read the original article Hit count: 414

Hi,

I've been using this simple command (that's all I can do :) to backup the whole tree from my user data in NAS server for a year.

cp -r /STORAGE /BACKUP-STORAGE/YYYY-MM-DD

Unfortunately, after a year of service. My user start filling the spaces with lot of photo and cliparts (jpg, gif, bmp) And that start to make my backup process get much slower. The space is also a big issue. Now I no longer have enough space for a week-long daily backup set.

I think I want to change from backup everything to backup only non-image data. How can I exclude jpg, gif, and bmp from the backup ? It's quite easy with DOS XCOPY command, but I really have no idea how to do that in bash.

Thanks

© Server Fault or respective owner

Related posts about bash

Related posts about backup