Go Back   CodingForums.com > :: Computing & Sciences > Computer Programming

Before you post, read our: Rules & Posting Guidelines

Reply
 
Thread Tools Rate Thread
Enjoy an ad free experience by logging in. Not a member yet? Register.
Old 10-31-2012, 12:08 PM   PM User | #1
alisamii
New Coder

 
Join Date: Nov 2003
Posts: 16
Thanks: 0
Thanked 0 Times in 0 Posts
alisamii is an unknown quantity at this point
Question Writing an rsync shell script on Mac to continuously sync local directory with remote

I need to set up a shell script on Mac OS X Mountain Lion to sync a local directory to a remote directory (web server) using either an SSH connection (tunnel) or SFTP and have it run continuously every 30 seconds.

I also need to exclude certain files or folders from being synced.

The syncing would be unidirectional (mac -> webserver).

The basic parameters I need to have implemented are as follows:

Code:
Local path: /Volumes/path/to/local/directory
Remote server: example.com
username: someUser
password: somePassword
Remote path: /path/from/server/root/to/htdocs
Files to exclude: '.ht*', '*.sublime-*'
Folders to exclude: 'cache','administrator/cache'
I would also need help writing the crontask and adding it to my system to execute automatically.

Any help would be greatly appreciated.
alisamii is offline   Reply With Quote
Reply

Bookmarks

Tags
cron, rsync, shell-script, web-deployment

Jump To Top of Thread


Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +1. The time now is 11:13 AM.


Advertisement
Log in to turn off these ads.