LinuxQuestions.org
Support LQ: Use code LQ3 and save $3 on Domain Registration
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 01-20-2012, 09:39 AM   #16
sscn
LQ Newbie
 
Registered: Jan 2006
Location: China
Distribution: Fedora
Posts: 27

Original Poster
Rep: Reputation: 0

Hi,

Thanks for your input on rsync advantage over cp.

My case is special. Better not to use rsync. There are around 100 PCs creating logs in 100MB every day on each PC at least. And all of these logs are transferred to the log server in real time. Sure, there are local logs in every PC besides copying them to log server.

I don't want to backup the log server frequently only if the logs reaches to 450GB closing to 500GB capacity. So rsync is not the ideal way to be used in my case.

Is there any copy utility which can know the previous copy time and only need to copy the files created after the previous time? It shall be the great one to me. Or I have to use cp to do the log transfer manually?

Thanks a lot,
 
Old 01-20-2012, 12:02 PM   #17
suicidaleggroll
LQ Guru
 
Registered: Nov 2010
Location: Colorado
Distribution: OpenSUSE, CentOS
Posts: 5,260

Rep: Reputation: 1948Reputation: 1948Reputation: 1948Reputation: 1948Reputation: 1948Reputation: 1948Reputation: 1948Reputation: 1948Reputation: 1948Reputation: 1948Reputation: 1948
You could write something along the [rough] lines of:

Code:
find /log_dir/ -iname "*.log" -newer copylog -exec scp "{}" backup_mach:/backup_logs/ \;
echo "Backup Completed: $(date)" > copylog

Might not be the best way to do it, but essentially this will copy all the log files over, then write out "Backup Completed" and the date into the file "copylog". The next time it runs, it only copies over log files that were modified more recently than copylog (more recently than your last copy).

Last edited by suicidaleggroll; 01-20-2012 at 12:03 PM.
 
1 members found this post helpful.
Old 01-23-2012, 01:02 PM   #18
sscn
LQ Newbie
 
Registered: Jan 2006
Location: China
Distribution: Fedora
Posts: 27

Original Poster
Rep: Reputation: 0
Hi suicidaleggroll,

you hit the key point to my copy puzzle with find options -newer & -exec.

It shall be one workable solution to me.

Thanks a lot.

sscn
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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 Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
copy without overwrite prompt nanda22 Linux - Newbie 6 07-11-2011 01:41 AM
[SOLVED] Network manager overwrite resolvconf vpn data with eth0 data rein2red Debian 1 03-21-2010 03:14 PM
GUI Folder Overwrite pymehta Linux - Software 1 03-07-2005 11:18 PM
Copy and Overwrite jrdioko Linux - Newbie 2 06-29-2004 12:46 PM
overwrite directory copy medamnit Linux - Newbie 1 05-26-2002 01:09 PM


All times are GMT -5. The time now is 01:22 AM.

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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration