What I'm trying to do backup?
- users home dir which include
Desktop
,Documents
,Pictures
,thunderbird
which i need to backup of every user - all users are in
/home
partition with there respective user name - there are certain user AND files in
/home
which need to be exclude
What I've tried so far?
$ tar cvf home01 -T include /home
NOTE: T which says only take that which are mention in file but does not work
$ find . \( -name \*Desktop -o -name \*Documents\* -o -name \*Pictures\* -o -name \.thunderbird\* \) |
xargs tar zcvf /opt/rnd/home-$(date +%d%m%y).tar.zip
NOTE: which takes backup of mention dir but it puts every users dir into one folder.
For example
$ ls -l /home
/home/user1/{Desktop,Documents,Pictures,.thunderbird}
/home/user2/{Desktop,Documents,Pictures,.thunderbird}
/home/user3/{Desktop,Documents,Pictures,.thunderbird}
/home/user4/{Desktop,Documents,Pictures,.thunderbird}
/home/user5/{Desktop,Documents,Pictures,.thunderbird}
From which I need to take only user1
,user2
,user3
home dir backup and exclude user4
,user5