- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Re: Error message when using tar for online backup
Categories
Company
Local Language
Forums
Discussions
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Forums
Discussions
Discussions
Forums
Discussions
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
- BladeSystem Infrastructure and Application Solutions
- Appliance Servers
- Alpha Servers
- BackOffice Products
- Internet Products
- HPE 9000 and HPE e3000 Servers
- Networking
- Netservers
- Secure OS Software for Linux
- Server Management (Insight Manager 7)
- Windows Server 2003
- Operating System - Tru64 Unix
- ProLiant Deployment and Provisioning
- Linux-Based Community / Regional
- Microsoft System Center Integration
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
10-01-2003 04:13 AM
10-01-2003 04:13 AM
.
.
if (tar -cvhf /dev/rmt/0m `cat datafiles.lst`)
then
echo "Database successfully backed up!!!" >> online_backup.log
else
echo "Database backup failed." >> online_backup.log
fi
tar -tvf /dev/rmt/0m >> online_backup.log
When I check the log file, I see all datafiles on the list. It seems to me all files are backuped fine, but I also see the "Database backup failed" in the log file. Why?
I appreciate any responses.
Thanks.
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-01-2003 04:26 AM
10-01-2003 04:26 AM
Re: Error message when using tar for online backup
There isn't anything I can see wrong with this but in this script, the file is always appended to, are you quite sure you're not just seeing previous failed runs?
Why do you have brackets around your first tar command?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-01-2003 04:35 AM
10-01-2003 04:35 AM
Re: Error message when using tar for online backup
I would consider trying something like:
tar -cvhf /dev/rmt/0m $(cat datafiles.lst) > backup.log 2>&1
if [ $? = 0 ]
then
echo "Database successfully backup up!"
else
echo "It wasn't"
fi
The tar statement will still do your backup, but it will send all of its output, both standard out and standard error, to the backup.log file so you can see if you are getting any errors.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-01-2003 04:36 AM
10-01-2003 04:36 AM
Re: Error message when using tar for online backup
Would that be a better idea to check only the return value of tar ?
tar -cvhf /dev/rmt/0m `cat datafiles.lst` 1>/tmp/out 2>&1
if [[ $? -ne 0 ]]
then
echo "Database backup failed." >> online_backup.log
else
echo "Database successfully backed up!!!" >> online_backup.log
fi
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-01-2003 04:49 AM
10-01-2003 04:49 AM
Re: Error message when using tar for online backup
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-01-2003 05:04 AM
10-01-2003 05:04 AM
Re: Error message when using tar for online backup
I solved the problem by switching to fbackup.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-01-2003 05:07 AM
10-01-2003 05:07 AM
Re: Error message when using tar for online backup
I used the same script on hp-ux10.20 and it worked fine. Now we just moved to hp-ux11i. Does the "tar" have something specail on 11i ?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-01-2003 06:27 AM
10-01-2003 06:27 AM
Re: Error message when using tar for online backup
And see if it works. Tar does return code 0 for successful command on 11i as well.
-GK-
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-01-2003 09:31 AM
10-01-2003 09:31 AM
Re: Error message when using tar for online backup
tar: Size of /db01/oracle/vis_sales_01.dbf > 2GB. Not dumped.
This datafile is greater than 2GB. Is there a way to backup this much big file?
Thanks.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-01-2003 09:40 AM
10-01-2003 09:40 AM
Re: Error message when using tar for online backup
Chris
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-01-2003 09:47 AM
10-01-2003 09:47 AM
SolutionThe native HP-UX tar can *NOT* handle large files (ie. larger than 2GB). There is a patch available for HP-UX 11i that will allow it to archive files up to 8GB.
NOTE -- If you install this patch then your tar archive will *ONLY* work on other HP-UX machines with this patch applied.
The patch you need to get this to work is PHCO_28992.
http://www1.itrc.hp.com/service/patch/patchDetail.do?patchid=PHCO_28992&context=hpux:800:11:11
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-02-2003 07:47 AM
10-02-2003 07:47 AM
Re: Error message when using tar for online backup
I installed the patch Partick recommended. It worked fine.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-02-2003 08:17 AM
10-02-2003 08:17 AM
Re: Error message when using tar for online backup
Someday you will encounter files greater than 8GB.. I suggest you start using GNU tar which addresses some of the limitations of most Unix's bundled tar... Did you know that even Veritas uses it (GnuTar) in its NetBackup product?