here is a script i use. I enable samba on the remote server so i can mount
the remote dir using smbfs (you can use cifs if you like)



mount -t smbfs //remote-ip/path /mnt/pre-made-dir -o
username=remoteuser,password=remotepassword

rsync -vazHK /local-path /mnt/pre-made-dir

umount /mnt/pre-made-dir



On Tue, Mar 13, 2012 at 12:29 PM, Edmonds Namasenda <[email protected]>wrote:

> Hello LUG,
>
> Help me fix my script better.
> I wish to transfer user files (folders inclusive) from a small capacity
> CentOS file server to a big capacity server (both local) overnight with
> cron to limit data loss et la
> Been tinkering with the script below with no success. The user logs in but
> no transfers take place
>
> ## Start Script
>
> # Login Credentials
> USERNAME="valid_remoteuser"
> PASSWORD="valid_remoteuser_pwd"
> SERVER="remoteServer_IP"
>
> # Files to transfer on local server (*.* as everything in the directory)
> FILE="/path_to/localServer_userdir/*.*"
>
> # Remote Server Directory
> REMDIR="/path_to/remoteServer/valid_userdir/"
>
> # login to remote server
> cd $REMDIR
> ftp -ni $SERVER <<END
> user $USERNAME $PASSWORD
> binary
> mput $FILE/*.*
> quit
> END
>
> ## End Script
>
>
> Thank you in advance,
> # Edz
>
> _______________________________________________
> The Uganda Linux User Group: http://linux.or.ug
>
> Send messages to this mailing list by addressing e-mails to:
> [email protected]
> Mailing list archives: http://www.mail-archive.com/[email protected]/
> Mailing list settings: http://kym.net/mailman/listinfo/lug
> To unsubscribe: http://kym.net/mailman/options/lug
>
> The Uganda LUG mailing list is generously hosted by INFOCOM:
> http://www.infocom.co.ug/
>
> The above comments and data are owned by whoever posted them (including
> attachments if any). The mailing list host is not responsible for them in
> any way.
>



-- 
Sanga M. Collins
Network Engineering
~~~~~~~~~~~~~~~~~~~~~~~
Google Voice: (954) 324-1365
E- fax: (435) 578 7411
_______________________________________________
The Uganda Linux User Group: http://linux.or.ug

Send messages to this mailing list by addressing e-mails to: [email protected]
Mailing list archives: http://www.mail-archive.com/[email protected]/
Mailing list settings: http://kym.net/mailman/listinfo/lug
To unsubscribe: http://kym.net/mailman/options/lug

The Uganda LUG mailing list is generously hosted by INFOCOM: 
http://www.infocom.co.ug/

The above comments and data are owned by whoever posted them (including 
attachments if any). The mailing list host is not responsible for them in any 
way.

Reply via email to