1
0
mirror of https://github.com/pgbackrest/pgbackrest.git synced 2025-06-18 23:57:33 +02:00

Resolve storage path expressions before passing to remote.

Expressions such as <REPO:ARCHIVE> require a stanza name in order to be resolved correctly.  However, if the stanza name is passed to the remote then that remote will only work correctly for that one stanza.

Instead, resolved the expressions locally but still pass a relative path to the remote.  That way, a storage path that is only configured on the remote does not need to be known locally.
This commit is contained in:
David Steele
2019-02-21 15:40:21 +02:00
parent b4d4680f8c
commit b1eb8af7d5
13 changed files with 81 additions and 80 deletions

View File

@ -100,7 +100,7 @@ testRun(void)
strPtr(
strNew(
"-o|LogLevel=error|-o|Compression=no|-o|PasswordAuthentication=no|repo-host-user@repo-host"
"|pgbackrest --command=archive-get --process=0 --stanza=test1 --type=backup remote")),
"|pgbackrest --command=archive-get --process=0 --type=backup remote")),
"remote protocol params");
// -------------------------------------------------------------------------------------------------------------------------
@ -122,7 +122,7 @@ testRun(void)
strNew(
"-o|LogLevel=error|-o|Compression=no|-o|PasswordAuthentication=no|-p|444|repo-host-user@repo-host"
"|pgbackrest --command=archive-get --config=/path/pgbackrest.conf --config-include-path=/path/include"
" --config-path=/path/config --process=0 --stanza=test1 --type=backup remote")),
" --config-path=/path/config --process=0 --type=backup remote")),
"remote protocol params with replacements");
}