- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Re: backup script
Operating System - HP-UX
1752346
Members
5867
Online
108787
Solutions
Forums
Categories
Company
Local Language
юдл
back
Forums
Discussions
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Discussions
Discussions
Forums
Forums
Discussions
юдл
back
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
Discussion Boards
Discussion Boards
Blogs
Information
Community
Resources
Community Language
Language
Forums
Blogs
Topic Options
- 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
тАО03-05-2011 01:10 AM
тАО03-05-2011 01:10 AM
backup script
i want to take a backup of whole unix server 11i.v3 when i execute the script it is giving me error
tar: n: unknown option
tar: usage tar [-]{txruc}[eONvVwAfblhm{op}][0-7[lmh]] [tapefile] [blocksize] [[-C directory] file] ...
i have attach the script can u please check the script and help me thanks
tar: n: unknown option
tar: usage tar [-]{txruc}[eONvVwAfblhm{op}][0-7[lmh]] [tapefile] [blocksize] [[-C directory] file] ...
i have attach the script can u please check the script and help me thanks
3 REPLIES 3
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО03-05-2011 01:34 AM
тАО03-05-2011 01:34 AM
Re: backup script
Hi,
Meanwhile I review your script please please execute it again ussing a trace option:
#sh -x
This option helps you to follow the execution sequence and find issues.
A first recomendation, when you compares variables inside an if ensures that both are the same type (alphanumeric or numeric), in your case, these:
if [ $DOM = "01" ];
if [ $DOW = "Thu" ];
for these:
if [ "$DOM" = "01" ];
if [ "$DOW" = "Thu" ];
Never mind that "01" looks a numeric value, you are force it to compare character by character with the other variable value.
Please execute the trace...
Rgds.
Meanwhile I review your script please please execute it again ussing a trace option:
#sh -x
This option helps you to follow the execution sequence and find issues.
A first recomendation, when you compares variables inside an if ensures that both are the same type (alphanumeric or numeric), in your case, these:
if [ $DOM = "01" ];
if [ $DOW = "Thu" ];
for these:
if [ "$DOM" = "01" ];
if [ "$DOW" = "Thu" ];
Never mind that "01" looks a numeric value, you are force it to compare character by character with the other variable value.
Please execute the trace...
Rgds.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО03-05-2011 01:49 AM
тАО03-05-2011 01:49 AM
Re: backup script
Hi,
Check your "else" section (Get date of last full backup):
NEWER="--newer `cat $TIMEDIR/$COMPUTER-full-date`"
$TAR $NEWER -cf $BACKUPDIR/$COMPUTER-$DOW.tar $DIRECTORIES
So the tar message:
tar: n: unknown option
The content of $NEWER beggins with "--n", then "tar" command interprets this an invalid option.
Whats is the sense of $NEWER here?
Rgds.
Check your "else" section (Get date of last full backup):
NEWER="--newer `cat $TIMEDIR/$COMPUTER-full-date`"
$TAR $NEWER -cf $BACKUPDIR/$COMPUTER-$DOW.tar $DIRECTORIES
So the tar message:
tar: n: unknown option
The content of $NEWER beggins with "--n", then "tar" command interprets this an invalid option.
Whats is the sense of $NEWER here?
Rgds.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО03-05-2011 05:42 AM
тАО03-05-2011 05:42 AM
Re: backup script
You need to use gnu tar to support --newer:
http://www.gnu.org/software/tar/manual/tar.html#SEC114
Otherwise you can use find and pax(1).
http://www.gnu.org/software/tar/manual/tar.html#SEC114
Otherwise you can use find and pax(1).
The opinions expressed above are the personal opinions of the authors, not of Hewlett Packard Enterprise. By using this site, you accept the Terms of Use and Rules of Participation.
News and Events
Support
© Copyright 2024 Hewlett Packard Enterprise Development LP