LinuxQuestions.org
Visit Jeremy's Blog.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices


Reply
  Search this Thread
Old 12-29-2007, 08:01 AM   #1
yusufs
Member
 
Registered: Oct 2007
Posts: 162

Rep: Reputation: 30
automatic copy


Dear all,

I have one important destination in my disk where all archive logs are getting
generated. generates 1 per 15 mins.. so I dont want to lose all this archive logs as this are very much important..I copied all the files to a different linux machine before 2 days and now there are 175 files to be copied now.. is there any way I can automate using writing any script and automating using CRON.. such that the directory should be checked for new files and if any it has to be copied to the remote location immediately..


Seniors,please do help..


Thanks
Yusuf
 
Old 12-29-2007, 02:07 PM   #2
choogendyk
Senior Member
 
Registered: Aug 2007
Location: Massachusetts, USA
Distribution: Solaris 9 & 10, Mac OS X, Ubuntu Server
Posts: 1,197

Rep: Reputation: 105Reputation: 105
rsync

There are a number of solutions that might work, but I would try rsync in this situation. http://samba.org/rsync/

Depending on your distribution, you may already have rsync available. Try `man rsync` and see.
 
Old 12-29-2007, 08:35 PM   #3
trickykid
LQ Guru
 
Registered: Jan 2001
Posts: 24,149

Rep: Reputation: 269Reputation: 269Reputation: 269
Create cron job:

1 * * * * /usr/bin/rsync -av [source] [destination]

source being the files to copy from or directory where files are at
destination is well, place you want to files copied to.

man crontab for more details on how to setup cron jobs.
 
Old 01-01-2008, 04:02 AM   #4
yusufs
Member
 
Registered: Oct 2007
Posts: 162

Original Poster
Rep: Reputation: 30
Quote:
Originally Posted by trickykid View Post
Create cron job:

1 * * * * /usr/bin/rsync -av [source] [destination]

source being the files to copy from or directory where files are at
destination is well, place you want to files copied to.

man crontab for more details on how to setup cron jobs.




Thanks choogendyk and Tricky kid....

files are of mininum size 11mb , can this be acheived using rsync..

please throw some lite on this..

Thanks
Yusuf
 
Old 01-01-2008, 07:58 AM   #5
trickykid
LQ Guru
 
Registered: Jan 2001
Posts: 24,149

Rep: Reputation: 269Reputation: 269Reputation: 269
Quote:
Originally Posted by yusufs View Post
Thanks choogendyk and Tricky kid....

files are of mininum size 11mb , can this be acheived using rsync..

please throw some lite on this..

Thanks
Yusuf
rsync can handle any filesize your filesystem can support.
 
Old 01-02-2008, 07:28 AM   #6
yusufs
Member
 
Registered: Oct 2007
Posts: 162

Original Poster
Rep: Reputation: 30
Quote:
Originally Posted by trickykid View Post
rsync can handle any filesize your filesystem can support.



Thanks Trickykid it is working fine



Yusuf
 
  


Reply



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



Similar Threads
Thread Thread Starter Forum Replies Last Post
LXer: Sun's 'Project Copy Linux' not a Linux copy LXer Syndicated Linux News 0 07-29-2007 08:46 AM
CLI copy is greater than GUI copy ?? 0_o killahsmurf Slackware 14 01-04-2006 11:53 AM
Automatic Logins b_mallerd Linux - General 2 07-03-2005 08:29 AM
how to copy and paste acd copy cd paschim Linux - General 2 04-05-2004 09:25 AM
boot error after using Copy Commander to copy debian system onto larger new drive Interceptor Linux - Hardware 7 05-04-2003 12:40 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - General

All times are GMT -5. The time now is 07:44 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration