Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

PBM-1058: fix phys backups on datadirs with tailing / #802

Merged
merged 1 commit into from Mar 16, 2023

Conversation

dAdAbird
Copy link
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.

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.
@JNKPercona
Copy link
Collaborator

Test name Logical Physical
New cluster psmdb 4.4 passed -
New cluster psmdb 4.2 passed -
New cluster psmdb 5.0 passed -
New cluster psmdb 6.0 failed -
Non-sharded psmdb 4.2 passed passed
Sharded psmdb 4.2 failed passed
Non-sharded psmdb 5.0 failed passed
Non-sharded psmdb 4.4 passed passed
Non-sharded psmdb 6.0 passed passed
Single-node psmdb 4.4 failed passed
Single-node psmdb 5.0 failed passed
Single-node psmdb 6.0 passed passed
Single-node psmdb 4.2 passed passed
Sharded psmdb 4.4 failed passed
Sharded psmdb 5.0 failed passed
Sharded psmdb 6.0 failed failed

@dAdAbird dAdAbird merged commit 173db8f into main Mar 16, 2023
10 checks passed
@dAdAbird dAdAbird deleted the PBM-1058_phys_restore_verifone branch March 16, 2023 12:27
dAdAbird added a commit that referenced this pull request Mar 16, 2023
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.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
5 participants