On Wednesday 17 September 2003 06:05 pm, Jianping Zhu wrote:
> Thanks for advice. the problem solved
> One more question, is there a way i can set up my linux server to
> automacitally mount windows share every time i start the server so I can
> automate to rsync process?

DIdn't I reply to question just like this coupe days ago? Don't remember if 
it's the same thread, but it was the same problem with backing up Win to 
Linux using rsync and smbmount. You should check the archive.

Anyway, here is the answer. Samba can use credentials file. Read
$> man smbmount
That will take care of the authentication part (eg. username + passwd for 
samba mount).

Then if you want it to be automatically mount during boot, add the command 
that you type by hand to /etc/rc.d/rc.local

Anything that you put on rc.local will be executed during boot. You may want 
to be carefull and make sure it works, otherwise your system may not work 
correctly.

Even better is probably to just put the mount command on a script, and also 
the rsync command on the same script, so the (pseudo)script will have 
something like (this is un-tested, just to give you idea):

#!/bin/bash
smbmount /mnt/win //win.machine/sharename -o credentials=<filename>
rsync <options> /mnt/win/* /backup/dir
smbumount /mnt/win

Done.
RDB

-- 
Reuben D. Budiardja
Department of Physics and Astronomy
The University of Tennessee, Knoxville, TN
-------------------------------------------------
/"\  ASCII Ribbon Campaign against HTML    
\ /  email and proprietary format      
 X   attachments.
/ \
-------------------------------------------------
Have you been used by Microsoft today? 
Choose your life. Choose freedom. 
Choose LINUX.
-------------------------------------------------


-- 
redhat-list mailing list
unsubscribe mailto:[EMAIL PROTECTED]
https://www.redhat.com/mailman/listinfo/redhat-list

Reply via email to