Unix Technical Forum

restore crontab /var/spool/cron/crontabs/cronfile

This is a discussion on restore crontab /var/spool/cron/crontabs/cronfile within the AIX Operating System forums, part of the Unix Operating Systems category; --> hello All, I'm trying to restore a crontab called cronfile how ever every time i restore it using. tctl ...


Go Back   Unix Technical Forum > Unix Operating Systems > AIX Operating System

Register FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 01-05-2008, 11:49 AM
pinoy2ser
 
Posts: n/a
Default restore crontab /var/spool/cron/crontabs/cronfile

hello All,

I'm trying to restore a crontab called cronfile how ever every time
i restore it using.

tctl fsf 3
restore -xvf /dev/rmt0.1 /var/spool/cron/crontabs/cronfile

i get the following message
restore: 0511-260 The archive is not in backup format

Also when i use smit restmksysb
it does not restore the file eventhough the file exist in the mksysb
backup..

can i just do a more command to see the the file and save the output
to a file?

Im not sure where the problem is...

thanks
pinoy

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #2 (permalink)  
Old 01-05-2008, 11:49 AM
Hajo Ehlers
 
Posts: n/a
Default Re: restore crontab /var/spool/cron/crontabs/cronfile

On 12 Jun., 21:34, pinoy2ser <pinoy2...@gmail.com> wrote:
....
>
> tctl fsf 3


Are you sure that the default tape drive is rmt0 and you did a rewind
each time ?

> restore -xvf /dev/rmt0.1 /var/spool/cron/crontabs/cronfile
>


Anyway:
The order to verify a mksysb according to the redbook

http://www.redbooks.ibm.com/redbooks/pdfs/sg246199.pdf

is:
......
To see the contents of the mksysb tape, use the following sequence of
commands:
1. Rewind the tape using the command:

tctl -f /dev/rmtxx rewind

2. Advance the tape to the fourth file marker by running the command:

tctl -f /dev/rmtxx fsf 3

3. Read the contents of the tape and redirect the output to a
temporary file by using the command:

restore -Tvqf /dev/rmtxx.1 > /tmp/mksysb.log

You can skip the second step in the procedure and go directly to
viewing the contents of the tape by running the command:

restore -s4 -Tvqf /dev/rmtxx.1 > /tmp/mksysb.log

The -s4 flag of the restore command automatically advances the tape to
the beginning of the fourth file marker for restore.
......

hth
Hajo

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #3 (permalink)  
Old 01-05-2008, 11:49 AM
pinoy2ser
 
Posts: n/a
Default Re: restore crontab /var/spool/cron/crontabs/cronfile

On Jun 12, 4:54 pm, Hajo Ehlers <serv...@metamodul.com> wrote:
> On 12 Jun., 21:34, pinoy2ser <pinoy2...@gmail.com> wrote:
> ...
>
>
>
> > tctl fsf 3

>
> Are you sure that the default tape drive is rmt0 and you did a rewind
> each time ?
>
> > restore -xvf /dev/rmt0.1 /var/spool/cron/crontabs/cronfile

>
> Anyway:
> The order to verify a mksysb according to the redbook
>
> http://www.redbooks.ibm.com/redbooks/pdfs/sg246199.pdf
>
> is:
> .....
> To see the contents of the mksysb tape, use the following sequence of
> commands:
> 1. Rewind the tape using the command:
>
> tctl -f /dev/rmtxx rewind
>
> 2. Advance the tape to the fourth file marker by running the command:
>
> tctl -f /dev/rmtxx fsf 3
>
> 3. Read the contents of the tape and redirect the output to a
> temporary file by using the command:
>
> restore -Tvqf /dev/rmtxx.1 > /tmp/mksysb.log
>
> You can skip the second step in the procedure and go directly to
> viewing the contents of the tape by running the command:
>
> restore -s4 -Tvqf /dev/rmtxx.1 > /tmp/mksysb.log
>
> The -s4 flag of the restore command automatically advances the tape to
> the beginning of the fourth file marker for restore.
> .....
>
> hth
> Hajo


thanks for the help Hajo... i was able to restore the the cronfile by
using your advice :
1) tctl -f /dev/rmtxx rewind
2) tctl -f /dev/rmtxx fsf 3
3) restore -xvqf -s4 /dev/rmt0.1 ./var/spool/cron/crontabs/cronfile

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On
Forum Jump


All times are GMT. The time now is 01:21 AM.


Powered by vBulletin® Version 3.6.5
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
SEO by vBSEO 3.2.0
www.UnixAdminTalk.com