Command Reference Guide > Command Reference Guide > Using Ingres Commands > relocatedb Command--Move a Location to a New Location
Was this helpful?
relocatedb Command--Move a Location to a New Location
The relocatedb command moves the journal, dump, checkpoint, or default work location for a database to another location (when a disk fills or is swapped out, for example).
The relocatedb command can also make a copy of an entire database. Any location in the original database can be moved to a new location in the new database.
The relocatedb command has the following format:
relocatedb dbname[/server_class] -new_ckp_location=locationname |
-new_dump_location=locationname | -new_jnl_location=locationname |
-new_work_location=locationname | -new_database=newdbname
[-location=locationname{, locationname} -new_location=locationname
{, locationname}]
dbname
Specifies the name of the database whose files are to be moved, and if required, the server_class, as described in Standard Flags and Parameters.
-new_ckp_location=locationname
Specifies the name of the new checkpoint location. The location must be defined with checkpoint usage. Checkpoints should not be run when relocating a checkpoint location.
-new_dump_location=locationname
Specifies the name of the new dump location. The location must be defined with dump usage. Checkpoints should not be run when relocating a dump location.
-new_jnl_location=locationname
Specifies the name of the new journal location. The location must be defined with journal usage. Journaling and checkpoints should not be run when relocating a journal location.
-new_work_location=locationname
Specifies the name of the new work location. The database must have been previously extended to this location for work usage. An exclusive lock is required during the relocation operation.
-new_database=newdbname
Specifies the name of the new database to be created.
This option creates all the directories and copies all the files from the old database to the new database.
An exclusive lock on the original database is required while the original database is copied to the new database.
Note:  Files for data recovery (*.ckp, *.jnl, *.dmp) are applicable to the original database only and are not valid for the new database. Following a relocatedb -new_database=newdbname, the new database should have a checkpoint taken with the appropriate journaling flags set according to its usage.
-location=locationname(, locationname)
Specifies a list of locations. All locations in the list must be valid locations for the database. The physical files in the data areas are copied to the same location for the new database.
When new_location is specified, the physical files in each data area in the location list is copied to the corresponding data area in the new location list.
This option is valid only for database relocation (-new_database=newdbname).
-new_location=locationname(, locationname)
Specifies a list of new locations. All locations in the list must be defined for the installation, and the usage must be compatible with the usage of the corresponding area in the location list. Each location in the location list must be mapped to a distinct location in the new location list.
This option is valid only for database relocation (-new_database=newdbname).
Last modified date: 08/29/2024