LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.

Notices


Reply
  Search this Thread
Old 09-01-2005, 03:51 AM   #1
remev12
LQ Newbie
 
Registered: Sep 2005
Location: South Africa
Posts: 2

Rep: Reputation: 0
Scripts


Hi i wud like to know where i could find a backup scripts to run with cron.
All the script has to do is delete a backup scsi drive and copy the latest folder in to.im new to linux and i wud like to implement that on a Red 9 Server ,it is a file server.
thanks
 
Old 09-02-2005, 01:30 PM   #2
david_ross
Moderator
 
Registered: Mar 2003
Location: Scotland
Distribution: Slackware, RedHat, Debian
Posts: 12,047

Rep: Reputation: 79
Welcome to LQ.

I'm not sure what you want that couldn't be done with:
#!/bin/bash
# Remove old directory
rm -rf /path/to/remove
# Copy latest directory
cp -r /path/to/source /path/to/dest
 
Old 09-02-2005, 01:49 PM   #3
sundialsvcs
LQ Guru
 
Registered: Feb 2004
Location: SE Tennessee, USA
Distribution: Gentoo, LFS
Posts: 10,636
Blog Entries: 4

Rep: Reputation: 3933Reputation: 3933Reputation: 3933Reputation: 3933Reputation: 3933Reputation: 3933Reputation: 3933Reputation: 3933Reputation: 3933Reputation: 3933Reputation: 3933
Presumably "yes, of course," but he wants to do it with cron.

On my somewhat-old "Red Hat 9-3/4," there is an /etc/cron.daily directory and anything in there will be executed daily. (The default /etc/crontab does that, with other directories for "hourly" and "monthly.") The desired commands could be put into an appropriate script-file in that location. Remember to mark it "executable," by whatever user-ID is used to run cron.

As far as backing-up goes, I tend to use a more sophisticated tool like amanda, because I not-only want a reliable way to back-up the information but also an easy way to restore them.
 
Old 09-05-2005, 01:23 AM   #4
remev12
LQ Newbie
 
Registered: Sep 2005
Location: South Africa
Posts: 2

Original Poster
Rep: Reputation: 0
thanks alot.
 
  


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
VPN: Debian Scripts -> Mandriva 2006 Scripts Undefined Mandriva 0 11-30-2005 12:10 PM
Need help running scripts from scripts sdouble Linux - Newbie 3 05-31-2004 12:56 PM
What scripts would you like to see? kittani Linux - Software 1 05-20-2004 03:26 AM
Scripts? zombie killa Linux - Software 5 05-29-2003 05:19 PM
scripts mdjames0 Linux - Newbie 4 08-02-2002 09:10 PM

LinuxQuestions.org > Forums > Non-*NIX Forums > Programming

All times are GMT -5. The time now is 08:33 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
Open Source Consulting | Domain Registration