3

PBM-1058: fix phys backups on datadirs with tailing / by dAdAbird · Pull Request...

 1 year ago
source link: https://github.com/percona/percona-backup-mongodb/pull/802
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.
neoserver,ios ssh client

Conversation

Member

Phys backup while trimming datadir from the file path always added a slash to the trim prefix. In case datadir was set with a tailing slash it led to a double slash and datadir wasn't trimmed at all (Trimprefix("/data/db/file1", "/data/db//")). Therefore in the backup's meta such files contain datadir and the restore would put them in a subdirectory inside datadir, "/data/db/data/db/file1" instead of "/data/db/file1".

This change fixes it.


About Joyk


Aggregate valuable and interesting links.
Joyk means Joy of geeK