by Ron Deen <firstname.lastname@example.org>
& Marco de Waal <email@example.com>
What it does:
This save_all.sh script creates a SaveAll for the stations defined.
It uses the Foxboro ICCAPI utilities, part of the standard I/A distribution
Preferred home for this scripts:
For Unix: /opt/tools
For NT: D:\opt\tools (the drive MUST be D:)
New in version 1.3:
- Checks for locked Control Database on remote hosts.
- Tested and modified to run on NT platform.
- Checks for space on filesystem!
- Maintains a determined number of back-ups with -b option (default is 10).
In version 1.3.1:
- Script would fail (on UNIX) if save_all directory does not exist. This was fixed.
In version 1.3.2: Thanks Bram Marsman!!
- Bug fixed: Deletion of old backups was done BEFORE making new backup, causing one backup more than specified.
- Timestamp for backups now saveall-time instead of backup-time.
- More than 1 backup per day possible (changed the time indication in the file).
In version 1.3.3: by Stan Brown <firstname.lastname@example.org>
- Added /usr/local to path and changed from compress to gzip for better compression. Also merged in the upload() function from Duc M Do
- Added -n option to disable upload/checkpoint if desired, since these can take a long time.
New features in version 2.0:
- Include files referred to from sequence sources are backed up on a "per station" basis.
- Make SaveAll's for selected hosts with the "-h" option.
- Upload stations before making a SaveAll (was already implemented in the Cassandra version 1.3.3).
- Support an optional external configuration file. (sample release file save_all.rel is enclosed.)
New features in version 2.2:
- Log files are now kept with the save_all action in the "log" directory under the save_all home directory
- volumes are now part of the save_all procedure (by request of TotalFinaElf Vlissingen)
- the external configuration file save_all.cfg has been enhanced.
- A PDF-format manual was made to allow even easier implementation of the save_all.sh script.
New features in version 2.2.1:
Current version: 2.2.1
The compressed file contains the script file, save_all.sh, and the companion release file, save_all.rel, showing the external configuration file, and the PDF-format manual: save_all-2.2.1.zip (405 KB)
save_all.sh -s string [[string] [string] [...]]
[-h string [string] [...]] [-u] [-b backups]
save_all.sh all [-b backups] [-h string1 string2] [-u]
Use regular expression similar to grep ( no * ):
where: -u = force upload first
-s string = [part of] station letterbug
-b digit = number of backups to be maintained
-h string = [part of] host letterbug
will make a SaveAll for ALL stations by ALL hosts in /opt/SAVEALLS, maintaining 10 backups (by default).
save_all.sh -s P30 -b 4 -u
will do an upload and make a SaveAll for stations CP3011, MGCP30, ACP30A, ... in /opt/SAVEALLS, maintaining 4 backups.
save_all.sh -h 1AWB11 all
will make a SaveAll for all stations hosted by 1AWB11 in /opt/SAVEALLS, maintaining 10 backups. (the "all" parameter is optional)
To run the script from "cron" you can try the following line:
15 1 * * * cd /opt/tools ; ./save_all.sh all -b 5
This will run save_all.sh every night at 15 past 1 for ALL stations in the system and will maintain 5 old SaveAll's per station.
The defaults (all variables are user definable in the script):
/etc/cplns for the stations that are configured in the system.
/opt/SAVEALLS for the SaveAll files per station.
/opt/SAVEALLS/backup for the old SaveAll's.
STATKB=2000 minimum amount of free diskspace per station in KB
(default is 2000).
ARCHNR=10 default number of old SaveAll's per station
(default is 10).
"save_all.sh all" will maintain a default
of 10 backups of SaveAll before the oldest SaveAll is lost. This is implemented
to save space, and prevent the filesystem from filling up over time.
All required directories are checked/created at runtime. So "save_all.sh all" will create all SaveAll's for all configured stations in the system.
save_all.sh creates an extensive log file in the startup directory named saveall.log.
Have fun, and feedback is highly appreciated!!
Ron Deen <email@example.com>
Marco de Waal <firstname.lastname@example.org>
Bram Marsman <email@example.com>
Copyright ©2000-2003 The Cassandra Project. All rights reserved.
web posted: 31 March 2000
last updated: 15 September 2003
Contact the webmaster for comments and/or questions.