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 07-22-2005, 09:36 AM   #1
welby
LQ Newbie
 
Registered: Jul 2003
Posts: 7

Rep: Reputation: 0
Scripting help.


Let me start off by saying that I'm not a scripter by trade, I just inherited this problem. Please be gentle with your answers, thanks.

I'm trying to figure out how to to the following:

Our backups run to a DVD system. We do one full per month, with daily differentials. The full is stored in /backups/currentfull/.
The diffs are stored in /diffs/dd-mm-yy, meaning today's diffs will reside in 07-22-05.

The problem this causes is that when a complete folder needs restoring, I have to manually go to the full, copy it out, and then go through each differential and copy out the more current files.

I'd like to automate this process. The biggest obstacle I see is that occasionally I have to restore, say, half a month instead of a whole month, or the changes to files make over the course of two weeks for example.

Any ideas how to accomplish this? I don't know of any kind of count function for dates or anything like that. All help is appreciated.

Mark
 
Old 07-22-2005, 08:32 PM   #2
jailbait
LQ Guru
 
Registered: Feb 2003
Location: Virginia, USA
Distribution: Debian 12
Posts: 8,336

Rep: Reputation: 548Reputation: 548Reputation: 548Reputation: 548Reputation: 548Reputation: 548
"I'd like to automate this process. The biggest obstacle I see is that occasionally I have to restore, say, half a month instead of a whole month, or the changes to files make over the course of two weeks for example.

Any ideas how to accomplish this?"

You might be able to do something with the -u parameter of the cp command. The -u parameter
causes cp to copy only when the SOURCE file is newer than the destination file or when the destination file is missing. You might be able to issue a mass copy command which only copies the relevent files.

See man cp

------------------------------
Steve Stites
 
  


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
new to scripting mifan Linux - Newbie 2 08-17-2005 12:10 PM
another help with scripting?! ice99 Programming 2 08-09-2005 08:56 AM
Need help scripting Tamara Programming 7 06-06-2005 02:06 AM
Scripting Help Please Jazinator Linux - Newbie 7 10-17-2004 06:35 PM
scripting bforest Linux - Newbie 4 05-11-2004 02:45 AM

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

All times are GMT -5. The time now is 07:50 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