Rally - On-premises: Performing a manual backup
search cancel

Rally - On-premises: Performing a manual backup

book

Article ID: 136010

calendar_today

Updated On:

Products

Rally On-Premise

Issue/Introduction

There are times when making a database backup is necessary due to the snapshot service not working correctly, or for testing more exotic disaster recovery processes.

 

These steps will generate an oracle .dmp backup file which can be used to restore data into a new Oracle VM instance or used as a backup to be restored into an existing Oracle VM instance.

 

Environment

Release : 2.0 - 2.1.1

Resolution

For version 2.1+

From the existing Production Service VM as the “ops” user run the following command: 

$ caac oracle_backup /mnt/db-dump/<filename>

NOTE: The successful backup should be indicated with logs shown below: 

Wed Jun 29 16:36:28 2022: pid=38:  Write complete.
Wed Jun 29 16:36:28 2022: pid=38:  Complete
Wed Jun 29 16:36:28 2022: pid=38:  Retrieving the dump file...
Wed Jun 29 16:36:28 2022: pid=38:  load pubkey "/root/.ssh/ac2go_oracle_rsa.pem": invalid format
Wed Jun 29 16:36:32 2022: pid=38:  Complete
Wed Jun 29 16:36:32 2022: pid=38:  Retrieving the log file...
Wed Jun 29 16:36:32 2022: pid=38:  load pubkey "/root/.ssh/ac2go_oracle_rsa.pem": invalid format
Wed Jun 29 16:36:33 2022: pid=38:  Complete
Wed Jun 29 16:36:33 2022: pid=38:  Executing removal of backup data on the DB VM...
Wed Jun 29 16:36:33 2022: pid=38:  Pseudo-terminal will not be allocated because stdin is not a terminal.
Wed Jun 29 16:36:33 2022: pid=38:  load pubkey "/root/.ssh/ac2go_oracle_rsa.pem": invalid format
Wed Jun 29 16:36:33 2022: pid=38:  Complete
Wed Jun 29 16:36:33 2022: pid=38:  Delete /tmp/backup.lock
Wed Jun 29 16:36:33 2022: pid=38:  Moving dump file into /mnt/db-dump/
Wed Jun 29 16:36:35 2022: pid=38:  Complete
Wed Jun 29 16:36:35 2022: pid=38:  Be sure to remove dumpfile /mnt/db-dump/dbdump.dmp if necessary to free disk space.
Wed Jun 29 16:36:35 2022: pid=38:  Database export completed successfully.

 

For version 2.0 - 2.0.1

From the existing Production Service VM as the “ops” user run the following command: 

$ caac oracle_backup

 

NOTE: The successful backup should be indicated with logs shown below: 

Thu Aug 1 17:42:17 2019: Write complete.

Thu Aug 1 17:42:17 2019: CompleteThu Aug 1 17:42:17 2019: Retrieving the dump file...Thu Aug 1 17:42:18 2019: CompleteThu Aug 1 17:42:18 2019: Retrieving the log file...Thu Aug 1 17:42:18 2019: CompleteThu Aug 1 17:42:18 2019: Executing backup script...Thu Aug 1 17:42:18 2019: Pseudo-terminal will not be allocated because stdin is not a terminal

Thu Aug 1 17:42:18 2019: Complete

 

Run the following command to determine the current oracle backup mount point where the oracle .dmp file was stored from the oracle backup command:

$ docker volume inspect $(docker volume ls --format='{{.Name}}' | grep oracle-backup) --format='{{.Mountpoint}}' 

 

The command above should return a path similar to the example below and is the location where the backup .dmp file is stored. Note that the “repl0996d3a5” id is the docker container tied the displayed mount point and is subject to change from time to time, usually after an application restart.

 

Sample output: 

/var/lib/docker/volumes/repl0996d3a5_oracle-backup/_data

 

Using the path returned from previous step, copy the backup .dmp to a location of your choosing for safe keeping! The backup file will be called dumpfile.dmp

 

Example:

/var/lib/docker/volumes/repl0996d3a5 _oracle-backup/_data/dumpfile.dmp