nixCraft Linux Forum

nixCraft

Linux Tech Support Forum

rsync folder

This is a discussion on rsync folder within the Shell scripting forums, part of the Development/Scripting category; Lets Suppose i have two servers. 1. Waseem Sayegh 2. Imran Anwar : IMRAN.COM : IMRAN.TV now in waseem server ...


Go Back   nixCraft Linux Forum > Development/Scripting > Shell scripting

Register FAQ Members List Calendar Forgotten your password? Mark Forums Read
  #1 (permalink)  
Old 04-27-2007, 07:36 PM
Member
User
 
Join Date: Jan 2007
Posts: 47
Rep Power: 0
zafar466
Default rsync folder

Lets Suppose i have two servers.
1.Waseem Sayegh
2.Imran Anwar : IMRAN.COM : IMRAN.TV
now in waseem server there is one folder e.g"/var/www/html/demo/app/log".Actually i want to rysnc "LOG"folder on my imran server. need ur guideness.
regards
Reply With Quote
Sponsored Links
  #2 (permalink)  
Old 04-28-2007, 04:28 AM
raj raj is offline
Contributors
User
 
Join Date: Jun 2005
Location: Hyderabad
Posts: 151
Rep Power: 4
raj is on a distinguished road
Default

Quote:
Originally Posted by zafar466 View Post
Lets Suppose i have two servers.
1.Waseem Sayegh
2.Imran Anwar : IMRAN.COM : IMRAN.TV
now in waseem server there is one folder e.g"/var/www/html/demo/app/log".Actually i want to rysnc "LOG"folder on my imran server. need ur guideness.
regards
You can synchronize a local directory with a remote rsync server:
rsync -r -a -v --delete rsync://backup-server.com/user/ /home/user/

A sample script
Code:
#!/bin/bash
MASTER="master-server-ip"
DIR="/var/www/change-me"
LDIR="/local/dir"
SSH="/usr/bin/ssh"
rsync -avrR --links --rsh=$SSH $MASTER:$DIR $LDIR
Try following faqs
How to use rsync for transferring files under Linux or UNIX | nixCraft

How do I sync data between two Load balanced Linux/UNIX servers? | nixCraft
__________________
Raj
Linux rulz.
I have never turned back in my life ; I shall not do so today.. haha
Reply With Quote
Reply

Bookmarks


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)

 
Thread Tools
Display Modes

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
Trackbacks are On
Pingbacks are On
Refbacks are On

Similar Threads

Thread Thread Starter Forum Replies Last Post
A script for Removing all the files inside a folder and its sub folder vivekv Shell scripting 1 10-25-2007 02:44 PM
rsync pls help linuxmanjusha Web servers 1 10-23-2007 12:12 PM
Rsync prblem pl. do favour, it's urgent kasimani Web servers 4 02-22-2007 05:12 PM
Rsync prblem pl. do favour, it's urgent kasimani Networking, Firewalls and Security 0 02-19-2007 11:27 AM
Require shell script using rsync puppen Shell scripting 4 04-23-2006 01:52 AM


All times are GMT +5.5. The time now is 03:36 AM.


Powered by vBulletin® Version 3.7.4 - Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.2.0

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36