Usage of ontape -p using the rename option
Posted in 2013
User reported that ontape -p (physical restore) with -rename option fails with "invalid argument" error on IDS 11.10.UC1 Linux, while ontape -r (full restore) with -rename works fine. Marcus Haarmann clarified the correct syntax requires -rename only once with multiple -p -o -n -o arguments following it, or using -f with a file. However, user's follow-up indicates the issue persists even with corrected syntax, leaving the problem unresolved.
Auto-generated by DrWatson from the posts below — may be imperfect; read the full thread.
Topics: High Availability & Replication, Backup & Restore, Storage & Space Management, Logging & Checkpoints
Hi All,
I am using IDS 11.10.UC1 on LINUX. I konw that it is not supported any
longer.
I am trying to setup an HDR replication between 2 servers.
On the secondary server, I have a problem using ontape -p using the
rename option.
Restoring using ontape -r with the rename option works fine, but NOT
using ontape -p.
When I run it , the syntaxe come back just like if the syntax was wrong.
I also tried using a file with a list of files, and the same problem
happens.
I get un "invalid argument" massage.
Again, works fine with the -r option.
----------------------------------------------------------
ontape -p -rename -p /var/opt/informix/dbs/ol_root -o 0 -n
/var/opt/informix/dbs20/ol_root -o 0
-rename -p /var/opt/informix/dbs/ol_datas -o 0 -n
/var/opt/informix/dbs20/ol_datas -o 0 -rename -p
/var/opt/informix/dbs/ol_temps -o 0 -n /var/opt/informix/dbs20/ol_temps -o 0invalid argument
ontape
usage:
{ -a |
-c |
-l [-C | -X] |
-p [-e] [-rename {-f <filename> |
-p <old path> -o <old offset> -n <new path> -o <new
offset>...}]
-S |
-r [-rename {-f <filename> |
-p <old path> -o <old offset> -n <new path> -o <new
offset>...}]
[-D DBspace_list] |
-s [[-L archive_level][-F]] [-A database_list] [-B database_list]
[-N database_list] [-U database_list] }
-a Automatic backup of logical logs
-c Continuous backup of logical logs
-d non-interactive mode for back up to or restore from a directory
-l Logical restore
-p [-e] Physical restore (-e for external physical restore)
-r Full restore DBspaces/BLOBspaces as listed
-s Archive full system
-A set the following database(s) to ansi logging
-B set the following database(s) to buffered logging
-C continuous logical log restore
-F Backup without updating archive information (useful for HDR, cloning
etc.)
-N set the following database(s) to no logging
-S Salvage logical logs only
-U set the following database(s) to unbuffered logging
-X finish continuous logical log restore and bring server to quiescent mode
-rename rename chunks during cold restore
with -rename options :
-f <filename> pathname of file containing list of mapped
chunk pathnames and offsets
-p old pathname of chunk
-o old offset of chunk
-n new pathname of chunk
-o new offset of chunk
Program over.
----------------------------------------------------------
The same problem happens with : ontape -p -rename -f file_chunks_rename
Again, ontape -r -rename -f file_chunks_rename works fine.
Any ideas are welcome.
--
Cordialement, Regards,
Khaled Bentebal
Directeur Général - ConsultiX
Président UGIF - User Group Informix France
IIUG - Board of Directors
Tél: 33 (0) 1 39 12 18 00
Fax: 33 (0) 1 39 12 18 18
Mobile: 33 (0) 6 07 78 41 97
Email: khaled.bentebal@consult-ix.fr
Site Web: www.consult-ix.fr
Hi Khaled,
First, HDR does not support a secondary which has different device names.
Primary and secondary server need to have the same device names (these might
be links,
referring to different locations of course).
Regarding ontape -p I think, you have used wrong syntax. The -rename arg is
supplied only once,
and you can add multiple -p -o -n -o args after the first -rename option.
Instead, you can use the -f option, which occurs only once and contain a
filename where multiple
lines are contained, one for each chunk
dev1 offset1 newdev1 offset1
dev2 offset2 newdev2 offset2
Hope this helps,
Marcus
----- Ursprüngliche Mail -----
Von: "Khaled Bentebal" <khaled.bentebal@consult-ix.fr>
An: ids@iiug.org
Gesendet: Montag, 7. Januar 2013 17:33:48
Betreff: Usage of ontape -p using the rename option [29202]
Hi All,
I am using IDS 11.10.UC1 on LINUX. I konw that it is not supported any
longer.
I am trying to setup an HDR replication between 2 servers.
On the secondary server, I have a problem using ontape -p using the
rename option.
Restoring using ontape -r with the rename option works fine, but NOT
using ontape -p.
When I run it , the syntaxe come back just like if the syntax was wrong.
I also tried using a file with a list of files, and the same problem
happens.
I get un "invalid argument" massage.
Again, works fine with the -r option.
----------------------------------------------------------
ontape -p -rename -p /var/opt/informix/dbs/ol_root -o 0 -n
/var/opt/informix/dbs20/ol_root -o 0
-rename -p /var/opt/informix/dbs/ol_datas -o 0 -n
/var/opt/informix/dbs20/ol_datas -o 0 -rename -p
/var/opt/informix/dbs/ol_temps -o 0 -n /var/opt/informix/dbs20/ol_temps -o 0invalid argument
ontape
usage:
{ -a |
-c |
-l [-C | -X] |
-p [-e] [-rename {-f <filename> |
-p <old path> -o <old offset> -n <new path> -o <new
offset>...}]
-S |
-r [-rename {-f <filename> |
-p <old path> -o <old offset> -n <new path> -o <new
offset>...}]
[-D DBspace_list] |
-s [[-L archive_level][-F]] [-A database_list] [-B database_list]
[-N database_list] [-U database_list] }
-a Automatic backup of logical logs
-c Continuous backup of logical logs
-d non-interactive mode for back up to or restore from a directory
-l Logical restore
-p [-e] Physical restore (-e for external physical restore)
-r Full restore DBspaces/BLOBspaces as listed
-s Archive full system
-A set the following database(s) to ansi logging
-B set the following database(s) to buffered logging
-C continuous logical log restore
-F Backup without updating archive information (useful for HDR, cloning
etc.)
-N set the following database(s) to no logging
-S Salvage logical logs only
-U set the following database(s) to unbuffered logging
-X finish continuous logical log restore and bring server to quiescent mode
-rename rename chunks during cold restore
with -rename options :
-f <filename> pathname of file containing list of mapped
chunk pathnames and offsets
-p old pathname of chunk
-o old offset of chunk
-n new pathname of chunk
-o new offset of chunk
Program over.
----------------------------------------------------------
The same problem happens with : ontape -p -rename -f file_chunks_rename
Again, ontape -r -rename -f file_chunks_rename works fine.
Any ideas are welcome.
--
Cordialement, Regards,
Khaled Bentebal
Directeur Gnral - ConsultiX
Prsident UGIF - User Group Informix France
IIUG - Board of Directors
Tl: 33 (0) 1 39 12 18 00
Fax: 33 (0) 1 39 12 18 18
Mobile: 33 (0) 6 07 78 41 97
Email: khaled.bentebal@consult-ix.fr
Site Web: www.consult-ix.fr
*******************************************************************************
Forum Note: Use "Reply" to post a response in the discussion forum.
HI Marcus,
Yes your are right that HDR requires that the chunks have the same paths.
However, I still do not understand why ontape -p does not work with the
rename option.
ontape -r works with a "-rename" option for every chunk.
I tried using a sigle "-rename" for all of the chunks and a "-rename"
option for every chunk, and the problem remains the same.
I tried the -f option, and it still does not work for "ontape -p".
Cordialement, Regards,
Khaled Bentebal
Directeur Général - ConsultiX
Président UGIF - User Group Informix France
IIUG - Board of Directors
Tél: 33 (0) 1 39 12 18 00
Fax: 33 (0) 1 39 12 18 18
Mobile: 33 (0) 6 07 78 41 97
Email: khaled.bentebal@consult-ix.fr
Site Web: www.consult-ix.fr
Le 07/01/13 17:57, Marcus Haarmann a écrit :
> Hi Khaled,
>
> First, HDR does not support a secondary which has different device names.
> Primary and secondary server need to have the same device names (these might
> be links,
> referring to different locations of course).
>
> Regarding ontape -p I think, you have used wrong syntax. The -rename arg is
> supplied only once,
> and you can add multiple -p -o -n -o args after the first -rename option.
> Instead, you can use the -f option, which occurs only once and contain a
> filename where multiple
> lines are contained, one for each chunk
> dev1 offset1 newdev1 offset1
> dev2 offset2 newdev2 offset2
>
> Hope this helps,
>
> Marcus
>
> ----- Ursprüngliche Mail -----
>
> Von: "Khaled Bentebal"<khaled.bentebal@consult-ix.fr>
> An: ids@iiug.org
> Gesendet: Montag, 7. Januar 2013 17:33:48
> Betreff: Usage of ontape -p using the rename option [29202]
>
> Hi All,
>
> I am using IDS 11.10.UC1 on LINUX. I konw that it is not supported any
> longer.
>
> I am trying to setup an HDR replication between 2 servers.
>
> On the secondary server, I have a problem using ontape -p using the
> rename option.
>
> Restoring using ontape -r with the rename option works fine, but NOT
> using ontape -p.
>
> When I run it , the syntaxe come back just like if the syntax was wrong.
> I also tried using a file with a list of files, and the same problem
> happens.
>
> I get un "invalid argument" massage.
>
> Again, works fine with the -r option.
>
> ----------------------------------------------------------
> ontape -p -rename -p /var/opt/informix/dbs/ol_root -o 0 -n
> /var/opt/informix/dbs20/ol_root -o 0
> -rename -p /var/opt/informix/dbs/ol_datas -o 0 -n
> /var/opt/informix/dbs20/ol_datas -o 0 -rename -p
> /var/opt/informix/dbs/ol_temps -o 0 -n /var/opt/informix/dbs20/ol_temps -o 0> invalid argument
> ontape
> usage:
> { -a |>
> -c |
>
> -l [-C | -X] |
>
> -p [-e] [-rename {-f<filename> |
>
> -p<old path> -o<old offset> -n<new path> -o<new
> offset>...}]
>
> -S |
>
> -r [-rename {-f<filename> |
>
> -p<old path> -o<old offset> -n<new path> -o<new
> offset>...}]
>
> [-D DBspace_list] |
>
> -s [[-L archive_level][-F]] [-A database_list] [-B database_list]
>
> [-N database_list] [-U database_list] }
>
> -a Automatic backup of logical logs
> -c Continuous backup of logical logs
> -d non-interactive mode for back up to or restore from a directory
> -l Logical restore
> -p [-e] Physical restore (-e for external physical restore)
> -r Full restore DBspaces/BLOBspaces as listed
> -s Archive full system
> -A set the following database(s) to ansi logging
> -B set the following database(s) to buffered logging
> -C continuous logical log restore
> -F Backup without updating archive information (useful for HDR, cloning
> etc.)
> -N set the following database(s) to no logging
> -S Salvage logical logs only
> -U set the following database(s) to unbuffered logging
> -X finish continuous logical log restore and bring server to quiescent mode
>
> -rename rename chunks during cold restore
>
> with -rename options :
>
> -f<filename> pathname of file containing list of mapped
>
> chunk pathnames and offsets
>
> -p old pathname of chunk
>
> -o old offset of chunk
>
> -n new pathname of chunk
>
> -o new offset of chunk
>
> Program over.
>
> ----------------------------------------------------------
> The same problem happens with : ontape -p -rename -f file_chunks_rename
>
> Again, ontape -r -rename -f file_chunks_rename works fine.
>
> Any ideas are welcome.
>
ontape should work with chunk renaming option (i'm not sure about HDR
environment). If you just want to test with the renaming option by restore the
instance using ontape, you can try:
ontape r rename f <chunklist>
Format of chunklist file, example:
/dev/PROD/chunk1 0 /dev/DEV/chunk1 0
/dev/PROD/chunk2 16 /dev/DEV/chunk2 16
/dev/PROD/chunk3 0 /dev/DEV/chunk3 0
Dont forget the offsets, and ontape -r -p -rename -f <chunklist> should work
too. In your chunklist file, don't include rootdbs, in your onconfig, keep
rootdbs identical to the source, and it will be renamed automagically when
done.
________________________________
From: Khaled Bentebal <khaled.bentebal@consult-ix.fr>
To: ids@iiug.org
Sent: Monday, January 7, 2013 12:43 PM
Subject: Re: Usage of ontape -p using the rename option [29204]
HI Marcus,
Yes your are right that HDR requires that the chunks have the same paths.
However, I still do not understand why ontape -p does not work with the
rename option.
ontape -r works with a "-rename" option for every chunk.
I tried using a sigle "-rename" for all of the chunks and a "-rename"
option for every chunk, and the problem remains the same.
I tried the -f option, and it still does not work for "ontape -p".
Cordialement, Regards,
Khaled Bentebal
Directeur Général - ConsultiX
Président UGIF - User Group Informix France
IIUG - Board of Directors
Tél: 33 (0) 1 39 12 18 00
Fax: 33 (0) 1 39 12 18 18
Mobile: 33 (0) 6 07 78 41 97
Email: khaled.bentebal@consult-ix.fr
Site Web: http://www.consult-ix.fr/
Le 07/01/13 17:57, Marcus Haarmann a écrit :
> Hi Khaled,
>
> First, HDR does not support a secondary which has different device names.
> Primary and secondary server need to have the same device names (these might
> be links,
> referring to different locations of course).
>
> Regarding ontape -p I think, you have used wrong syntax. The -rename arg is
> supplied only once,
> and you can add multiple -p -o -n -o args after the first -rename option.
> Instead, you can use the -f option, which occurs only once and contain a
> filename where multiple
> lines are contained, one for each chunk
> dev1 offset1 newdev1 offset1
> dev2 offset2 newdev2 offset2
>
> Hope this helps,
>
> Marcus
>
> ----- Ursprüngliche Mail -----
>
> Von: "Khaled Bentebal"<khaled.bentebal@consult-ix.fr>
> An: ids@iiug.org
> Gesendet: Montag, 7. Januar 2013 17:33:48
> Betreff: Usage of ontape -p using the rename option [29202]
>
> Hi All,
>
> I am using IDS 11.10.UC1 on LINUX. I konw that it is not supported any
> longer.
>
> I am trying to setup an HDR replication between 2 servers.
>
> On the secondary server, I have a problem using ontape -p using the
> rename option.
>
> Restoring using ontape -r with the rename option works fine, but NOT
> using ontape -p.
>
> When I run it , the syntaxe come back just like if the syntax was wrong.
> I also tried using a file with a list of files, and the same problem
> happens.
>
> I get un "invalid argument" massage.
>
> Again, works fine with the -r option.
>
> ----------------------------------------------------------
> ontape -p -rename -p /var/opt/informix/dbs/ol_root -o 0 -n
> /var/opt/informix/dbs20/ol_root -o 0
> -rename -p /var/opt/informix/dbs/ol_datas -o 0 -n
> /var/opt/informix/dbs20/ol_datas -o 0 -rename -p
> /var/opt/informix/dbs/ol_temps -o 0 -n /var/opt/informix/dbs20/ol_temps -o 0> invalid argument
> ontape
> usage:
> { -a |>
> -c |
>
> -l [-C | -X] |
>
> -p [-e] [-rename {-f<filename> |
>
> -p<old path> -o<old offset> -n<new path> -o<new
> offset>...}]
>
> -S |
>
> -r [-rename {-f<filename> |
>
> -p<old path> -o<old offset> -n<new path> -o<new
> offset>...}]
>
> [-D DBspace_list] |
>
> -s [[-L archive_level][-F]] [-A database_list] [-B database_list]
>
> [-N database_list] [-U database_list] }
>
> -a Automatic backup of logical logs
> -c Continuous backup of logical logs
> -d non-interactive mode for back up to or restore from a directory
> -l Logical restore
> -p [-e] Physical restore (-e for external physical restore)
> -r Full restore DBspaces/BLOBspaces as listed
> -s Archive full system
> -A set the following database(s) to ansi logging
> -B set the following database(s) to buffered logging
> -C continuous logical log restore
> -F Backup without updating archive information (useful for HDR, cloning
> etc.)
> -N set the following database(s) to no logging
> -S Salvage logical logs only
> -U set the following database(s) to unbuffered logging
> -X finish continuous logical log restore and bring server to quiescent mode
>
> -rename rename chunks during cold restore
>
> with -rename options :
>
> -f<filename> pathname of file containing list of mapped
>
> chunk pathnames and offsets
>
> -p old pathname of chunk
>
> -o old offset of chunk
>
> -n new pathname of chunk
>
> -o new offset of chunk
>
> Program over.
>
> ----------------------------------------------------------
> The same problem happens with : ontape -p -rename -f file_chunks_rename
>
> Again, ontape -r -rename -f file_chunks_rename works fine.
>
> Any ideas are welcome.
>
*******************************************************************************
Forum Note: Use "Reply" to post a response in the discussion forum.
That is because ontape -p is used almost exclusively for setting up HDR and
RSS secondaries which have to have identical chunk paths to the primary
server so a redirected restore doesn'e make any sense in this context.
Art
Art S. Kagel
Advanced DataTools (www.advancedatatools.com)
Blog: http://informix-myview.blogspot.com/
Disclaimer: Please keep in mind that my own opinions are my own opinions
and do not reflect on my employer, Advanced DataTools, the IIUG, nor any
other organization with which I am associated either explicitly,
implicitly, or by inference. Neither do those opinions reflect those of
other individuals affiliated with any entity with which I am affiliated nor
those of the entities themselves.
On Mon, Jan 7, 2013 at 10:33 AM, Khaled Bentebal <
khaled.bentebal@consult-ix.fr> wrote:
> Hi All,
>
> I am using IDS 11.10.UC1 on LINUX. I konw that it is not supported any
> longer.
>
> I am trying to setup an HDR replication between 2 servers.
>
> On the secondary server, I have a problem using ontape -p using the
> rename option.
>
> Restoring using ontape -r with the rename option works fine, but NOT
> using ontape -p.
>
> When I run it , the syntaxe come back just like if the syntax was wrong.
> I also tried using a file with a list of files, and the same problem
> happens.
>
> I get un "invalid argument" massage.
>
> Again, works fine with the -r option.
>
> ----------------------------------------------------------
> ontape -p -rename -p /var/opt/informix/dbs/ol_root -o 0 -n
> /var/opt/informix/dbs20/ol_root -o 0
> -rename -p /var/opt/informix/dbs/ol_datas -o 0 -n
> /var/opt/informix/dbs20/ol_datas -o 0 -rename -p
> /var/opt/informix/dbs/ol_temps -o 0 -n /var/opt/informix/dbs20/ol_temps -o> 0
> invalid argument
> ontape
> usage:
> { -a |>
> -c |
>
> -l [-C | -X] |
>
> -p [-e] [-rename {-f <filename> |
>
> -p <old path> -o <old offset> -n <new path> -o <new
> offset>...}]
>
> -S |
>
> -r [-rename {-f <filename> |
>
> -p <old path> -o <old offset> -n <new path> -o <new
> offset>...}]
>
> [-D DBspace_list] |
>
> -s [[-L archive_level][-F]] [-A database_list] [-B database_list]
>
> [-N database_list] [-U database_list] }
>
> -a Automatic backup of logical logs
> -c Continuous backup of logical logs
> -d non-interactive mode for back up to or restore from a directory
> -l Logical restore
> -p [-e] Physical restore (-e for external physical restore)
> -r Full restore DBspaces/BLOBspaces as listed
> -s Archive full system
> -A set the following database(s) to ansi logging
> -B set the following database(s) to buffered logging
> -C continuous logical log restore
> -F Backup without updating archive information (useful for HDR, cloning
> etc.)
> -N set the following database(s) to no logging
> -S Salvage logical logs only
> -U set the following database(s) to unbuffered logging
> -X finish continuous logical log restore and bring server to quiescent mode
>
> -rename rename chunks during cold restore
>
> with -rename options :
>
> -f <filename> pathname of file containing list of mapped
>
> chunk pathnames and offsets
>
> -p old pathname of chunk
>
> -o old offset of chunk
>
> -n new pathname of chunk
>
> -o new offset of chunk
>
> Program over.
>
> ----------------------------------------------------------
> The same problem happens with : ontape -p -rename -f file_chunks_rename
>
> Again, ontape -r -rename -f file_chunks_rename works fine.
>
> Any ideas are welcome.
>
> --
> Cordialement, Regards,
>
> Khaled Bentebal
> Directeur Général - ConsultiX
> Président UGIF - User Group Informix France
> IIUG - Board of Directors
> Tél: 33 (0) 1 39 12 18 00
> Fax: 33 (0) 1 39 12 18 18
> Mobile: 33 (0) 6 07 78 41 97
> Email: khaled.bentebal@consult-ix.fr
> Site Web: www.consult-ix.fr
>
>
>
>
*******************************************************************************
> Forum Note: Use "Reply" to post a response in the discussion forum.
>
>
--bcaec517cbe0a169c704d2b8c226
wont't work regardless even if you get the syntax rite.. it will start restoring and when it encounters the chunk path being renamed it will fail with an error stating redirected restores are not allowed with HDR ..as the requirement is that both servers must be identical which includes the storage paths.