Problem
After performing a migration using NBServerMigrator, the restore for a few files failed with status 130 or 227.
Error Message
Status 227 or Status 130.
Cause
In migration using NBServerMigrator, images that are present on a storage unit configured on the primary server are not preserved.
- Some of these backups are visible in the BAR GUI.
- Restoration of these images fails with status 130 or 227.
Solution
1. Identify the backupids that are causing this issue.
For NetBackup version 10.2 and above:
a. Copy the file postgres_sqlfile.sql in the nbsm directory. (the file postgres_sqlfile.sql is attached to the technote)
b. Run the command from the nbsm directory:
/usr/openv/db/bin/psql --host=localhost --port=13785 --username=postgres --dbname=NBDB -f postgres_sqlfile.txt > output.txt
or
<install_path>\veritas\netbackupdb\bin\psql.exe --host=localhost --port=13785 --username=postgres --dbname=NBDB -f postgres_sqlfile.txt > output.txt
For NetBackup version 10.1.1 and below:
a. Copy the file sybase_sqlfile.sql in the nbsm directory. (the file sybase_sqlfile.sql is attached to the technote)
b. Run the command from the nbsm directory:
/usr/openv/db/bin/dbisqlc -onerror exit -nogui -q -c "CS=utf8;UID=dba;PWD=<password>;DBN=NBDB;ServerName=<server_name>" "sybase_sqlfile.sql"
or
<install_path>\veritas\netbackupdb\bin\dbisqlc -onerror exit -nogui -q -c "CS=utf8;UID=dba;PWD=<password>;DBN=NBDB;ServerName=<server_name>" "sybase_sqlfile.sql"
Where:
- password = password of NBDB
- server_name = name of NBDB. (can be obtained using nbdb_ping command on the primary server)
Note: If an error is returned from: /usr/openv/db/bin/dbisqlc:
- error while loading shared libraries: libdblib17_r.so: cannot open shared object file: No such file or directory
Then, set the environment variable by running the command: . /usr/openv/db/vxdbms_env.sh
- The output.txt will consist of a list of backupids.
- For the backupids of the client for which the issue is occurring, run the command:
bpimagelist -backupid <backup_id> -L - Check if the value of "Number of Copies" is 0
- If the value of "Number of Copies" is 0, then expire the backupid using the command:
bpexpdate -backupid <backup_id> -d 0 -nodelete