- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- backup script
Categories
Company
Local Language
Forums
Discussions
- Integrity Servers
- Server Clustering
- HPE NonStop Compute
- HPE Apollo Systems
- High Performance Computing
Knowledge Base
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Knowledge Base
Forums
Discussions
- Cloud Mentoring and Education
- Software - General
- HPE OneView
- HPE Ezmeral Software platform
- HPE OpsRamp Software
Knowledge Base
Discussions
Forums
Discussions
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Community
Resources
Forums
Blogs
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-26-2004 10:39 PM
08-26-2004 10:39 PM
backup script
Could you help me wiht making one script.
Wat should this script do:
Ordinary backup.
I wil use fbackup tool
I want to backup evrytihing on my box (EVRYTHING)
Script should genereted a log file to see witch file's are backuped.Also script should
genered a error.log file to see what is wrong.If something is wrong i should get a mail in my mailbox
ofcourse i wil stop all application before i do backup.
This script should tel me how long it teked to make backup.
Just start time and date and on the end of the backup end time.
Thank you in advance
P.S. not too complicate i have to understnd it
OS is use is HP-UX 11.11. version 1
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-26-2004 10:57 PM
08-26-2004 10:57 PM
Re: backup script
# get date for logfile names.
DATE=`date +%d%m%Y`
# save starting time/date.
START=`date`
# do the backup. the -v will generate a large log, but it includes all filenames. write to .log and .err file.
fbackup -0 -v -i / -f /dev/rmt/0mn > /somefilesystem/backup.$DATE.log 2>/somefilesystem/backup.$DATE.err
# check returncode of fbackup command
if [ $? -ne 0 ]; then
# there was an error so mail admin
cat /somefilesystem/backup.$DATE.err | mailx -s "Backup Error Log" [email protected]
fi
# append start time to logfile
echo "Started: $START" >> /somefilesystem/backup.$DATE.log
# append end time to logfile
echo "Finished: `date`" >> /somefilesystem/backup.$DATE.log
Something like that would be a start.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-27-2004 12:04 AM
08-27-2004 12:04 AM
Re: backup script
Try:
fbackup -I index.log -f /dev/rmt/... -i / 1>error.log 2>&1
where /dev/rmt/... is your device file, index.log is the file where all saving files are tracing. fbackup create a index on tape but this index is create BEFORE save and is not completety reliable. -I option create index on disk AFTER save (it isn't create if command fails).
For more info to fbackup command: http://docs.hp.com/fr/5187-2222/ch06s04.html#fbackup (in french, sorry I don't know URL for english doc.)
Rgds
JMB
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-27-2004 12:17 AM
08-27-2004 12:17 AM
Re: backup script
Sorry i forget script.
# Total Save:
BEGIN=`date`
fbackup -I index.log -f /dev/rmt/0m -i / 1>error.log 2>&1
if [ $? != ]
then
echo "Save error"
fi
END=`date`
echo "$BEGIN" >result.log
cat error.log >> result.log
echo "\n$END" >> result.log
JMB
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-27-2004 12:57 AM
08-27-2004 12:57 AM
Re: backup script
1) fbackup will not allow you to produce a DR backkup. The tape will not contain any usable boot information other than config files. You need ignite for a boot tape.
2) It will not back up open databases like oracle or mysql or informix. It will work cold if the database is down first.
3) Any normal file will be backed up. Files that were present at start of backup and disappear during the backup will show up on an error log.
4) It is possible to keep a file with fbackup and do incremental backups.
SEP
Owner of ISN Corporation
http://isnamerica.com
http://hpuxconsulting.com
Sponsor: http://hpux.ws
Twitter: http://twitter.com/hpuxlinux
Founder http://newdatacloud.com
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-27-2004 01:14 AM
08-27-2004 01:14 AM
Re: backup script
Sep thank you foor your explanation.
Of course ik make ignite tapes too.
Maybe i get it wrong. In case of disaster i should use my ignite tape to boot my system. with fbackup i want to set all file's back if i need it( vg01,v02).
After that, i kan use probackup (online backup of my progress database) to put my database back.
What doe jou mean with punt 2 in your explanation
Thank you in advance
Idriz
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-27-2004 01:55 AM
08-27-2004 01:55 AM
Re: backup script
fbackup cannot save databases files when databases is up because fbackup cannot save any open (active) files. For tis reason, fbackup must be use when users are disconnect and you must stop databases during the save. If you cannot stop databases for long time: stop databases, copy files on another directory on disk, restart databases, save on tape with fbackup except directory where are active database files (-e option of fbackup).
Rgds
JMB