It's probalby a common question, and I've read the man pages and such,
but
I need a little bit more help getting this specific task to work right.
Basically, I want to mirror home directory structures, and only two files
within each home directory, to other machines from a central server. Those
files are ~/.spamassassin/user_prefs and ~/.procmailrc. Other files should
not be transfered, so I'm looking for some sort of wildcard statement to
do that. If I just put a * in there, nothing transfers. If I want to
transfer other files at a later date, I'll add them into the file with
+'s.
I would like to not have to specify each filename that I want to exclude.
Thanks,
Jason
This is all on the client machine.
mc1:/usr/local/mis/etc # cat mirror.home.exclude
+*/
+.spamassassin/user_prefs
+.procmailrc
+/home/*
.forward
public_html
mc1:/usr/local/mis/etc # cat ../sbin/mirror.home
#!/bin/bash
/usr/local/bin/rsync -avvW --delete
--exclude-from=/usr/local/mis/etc/mirror.home.exclude --force --stats
root@10.0.18.27::home /home
mc1:/usr/local/mis/etc # mirror.home
opening tcp connection to 10.0.18.27 port 873
receiving file list ...
done
expand file_list to 4000 bytes, did move
excluding directory daydream/public_html because of pattern public_html
deleting in .
delta-transmission disabled for local transfer or --whole-file
daydream/.bash_history is uptodate
daydream/.bashrc is uptodate
daydream/.profile is uptodate
jp/.bash_history is uptodate
jp/.bashrc is uptodate
jp/.muttrc is uptodate
jp/.profile is uptodate
jp/.spamassassin/user_prefs is uptodate
jp/Mailbox is uptodate
jp/passwd is uptodate
rsync[2509] (receiver) heap statistics:
arena: 135168 (bytes from sbrk)
ordblks: 6 (chunks not in use)
smblks: 2
hblks: 0 (chunks from mmap)
hblkhd: 0 (bytes from mmap)
usmblks: 0
fsmblks: 40
uordblks: 6888 (bytes used)
fordblks: 128280 (bytes free)
keepcost: 90576 (bytes in releasable chunk)
Number of files: 14
Number of files transferred: 0
Total file size: 8819 bytes
Total transferred file size: 0 bytes
Literal data: 0 bytes
Matched data: 0 bytes
File list size: 320
Total bytes written: 175
Total bytes read: 356
wrote 175 bytes read 356 bytes 1062.00 bytes/sec
total size is 8819 speedup is 16.61
mc1:/usr/local/mis/etc #
--
/*
Jason Philbrook | Midcoast Internet Solutions - Internet Access,
KB1IOJ | Hosting, and TCP-IP Networks for Midcoast Maine
http://f64.nu/ | http://www.midcoast.com/
*/