Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Novice Q - Schedule Copy from Command Line

Status
Not open for further replies.
Sep 18, 2002
19
0
0
US
I want to setup a nightly extra backup to an external HD. We have a clone server for security (also HP, SCSI, OpenServer 5.0.6).

We backup to tape via MicroLite's BackupEdge. We want to add a "backup" to an external Sun SCSI HD.

Restoring from the HD would be faster & easier, especially since we usually would only need to restore the DB directory. NOTE: The customer is PARANOID - they had one server failure in 6 years but now they do a restore on the clone weekly "just to be sure..."

THE PROBLEM:
I don't know Unix!
I can setup the new Sun HD (fdisk, divvy).
But I don't know:
1) how to create a "batch" job.
2) how to schedule the batch job to run every 2am.
3) if it is possible to to copy the all directories to the external HD (I assume it would skip any "active" files)?

Thanks



 
man cron
man crontab
man cpio

Hope This Help
PH.
 
Paranoia is good when it comes to backups and data...

Not sure what you mean by a "Sun HD"
- is it just a hd that you want to add to the live system?
- is it drive space on a Sun machine or Workstation?

First of all become familiar with the help command:
man

1. How to create a batch job? - in unix a batch job is referred to as a shell script. it is functionally equivalent to a dos batch file but can run under a number of different shells. just create a text file with the commands in it that you want executed (simplistic i know but it will get you started).

2. the unix scheduler is called cron. see: man cron

3. the utilities "find" and "cpio" can accomplish what you are looking for. It will take what it can including open files, so you may want to look for a quiet time to do the copying (just before or just after the tape bu).
example:

find /startingdir -print | cpio -pdmv /targetdir

 
Thanks - and the explanations were totally fine.

The "Sun HD" is an external UW SCSI Barracuda (exc. condition, low usage, $20 at a garage sale w/ cables).

Your suggestions let me focus on learning useful instructions instead of trying to figure out which instruction is likely to be the most appropriate. StanHubble's specificity is FANTASTIC, but PHV's simple listing of the commands is also very helpful.

I confess I learn best by reading up on the instructions in my several SCO Unix books - I find the Unix on-screen manual in command mode VERY clunky.

Thank you both VERY much!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top