Pivotal Knowledge Base

Follow

gpdbrestore Error- No dump file on sdwX

Environment

Pivotal Greenplum Database (GPDB) 4.3.x

Symptom

While restoring a gpcrondump backup to a different system, the following message could be received:

[ERROR]:-gpdbrestore error: No dump file on sdwX at /backup/db_dumps/20171119/gp_dump_0_2_20171119013835.gz.

Cause

When a backup is being restored, each segment needs to find a file with the name "gp_dump_0_<dbid>_<timestamp>.gz".

If the file is not found, the following error is reported:

[ERROR]:-gpdbrestore error: No dump file on sdwX at /backup/db_dumps/20171119/gp_dump_0_2_20171119013835.gz.

The file name would not match the current configuration if the backup was taken on a different system or if it was taken when there were some segments failed over to the mirrors.

Resolution

  1. Get the configuration of the source and the target systems as shown below:
    select * from gp_segment_configuration;
  2. Compare the dbid for each content between the source and the target systems.
  3. If the dbid is different between the systems, the filenames of the dump files need to be modified.

Example

The information below is the output from the gp_segment_configuration from the source and the target systems. There is a difference between the dbid for content 1. On the source system, the gpcrondump will create a file called "gp_dump_0_8_<timestamp>.gz", but the target system will expect a file called "gp_dump_0_3_<timestamp>.gz".

For the restore to be successful on the target system, the file will need to be renamed as shown below:

mv gp_dump_0_8_<timestamp>.gz gp_dump_0_3_<timestamp>.gz

The <timestamp> part of the name will remain unchanged.

src_db=# select * from gp_segment_configuration order by content; 
dbid | content | role | preferred_role | mode | status | port | hostname | address | replication_port | san_mounts
------+---------+------+----------------+------+--------+-------+----------+---------+------------------+------------
1 | -1 | p | p | s | u | 5432 | mdw | mdw | |
2 | 0 | p | p | c | u | 40000 | sdw1 | sdw1 | 41000 |
6 | 0 | m | m | s | d | 50000 | sdw2 | sdw2 | 51000 |
7 | 1 | m | m | s | d | 50001 | sdw2 | sdw2 | 51001 |
8 | 1 | p | p | c | u | 40001 | sdw1 | sdw1 | 41001 |

tgt_db=# select * from gp_segment_configuration order by content;
dbid | content | role | preferred_role | mode | status | port | hostname | address | replication_port | san_mounts
------+---------+------+----------------+------+--------+-------+----------+---------+------------------+------------
1 | -1 | p | p | s | u | 5432 | mdw | mdw | |
2 | 0 | p | p | c | u | 40000 | sdw1 | sdw1 | 41000 |
6 | 0 | m | m | s | d | 50000 | sdw2 | sdw2 | 51000 |
7 | 1 | m | m | s | d | 50001 | sdw2 | sdw2 | 51001 |
3 | 1 | p | p | c | u | 40001 | sdw1 | sdw1 | 41001 |

Comments

Powered by Zendesk