mirror of
https://github.com/pgbackrest/pgbackrest.git
synced 2024-12-12 10:04:14 +02:00
Add repo-get command.
This commit is contained in:
parent
218cd078a6
commit
b65c370346
@ -626,7 +626,6 @@ my $rhCommandDefine =
|
|||||||
|
|
||||||
&CFGCMD_REPO_GET =>
|
&CFGCMD_REPO_GET =>
|
||||||
{
|
{
|
||||||
&CFGDEF_INTERNAL => true,
|
|
||||||
&CFGDEF_LOG_FILE => false,
|
&CFGDEF_LOG_FILE => false,
|
||||||
&CFGDEF_LOG_LEVEL_DEFAULT => DEBUG,
|
&CFGDEF_LOG_LEVEL_DEFAULT => DEBUG,
|
||||||
&CFGDEF_PARAMETER_ALLOWED => true,
|
&CFGDEF_PARAMETER_ALLOWED => true,
|
||||||
|
@ -1349,10 +1349,12 @@
|
|||||||
</command>
|
</command>
|
||||||
|
|
||||||
<!-- OPERATION - REPO-GET COMMAND -->
|
<!-- OPERATION - REPO-GET COMMAND -->
|
||||||
<command id="repo-get" name="Repository Get File">
|
<command id="repo-get" name="Repository Get">
|
||||||
<summary>Get a file from the repository.</summary>
|
<summary>Get files from a repository.</summary>
|
||||||
|
|
||||||
<text>Similar to the unix <cmd>cat</cmd> command but options are different.</text>
|
<text>Similar to the unix <cmd>cat</cmd> command but works on any supported repository type. This command is primarily for administration, investigation, and testing. It is not a required part of a normal <backrest/> setup.
|
||||||
|
|
||||||
|
If the repository is encrypted then <cmd>repo-get</cmd> will automatically decrypt the file. Files are not automatically decompressed but the output can be piped through the appropriate decompression command, e.g. <id>gzip -d</id>.</text>
|
||||||
|
|
||||||
<option-list>
|
<option-list>
|
||||||
<!-- OPERATION - REPO-GET COMMAND - IGNORE-MISSING OPTION -->
|
<!-- OPERATION - REPO-GET COMMAND - IGNORE-MISSING OPTION -->
|
||||||
|
@ -36,6 +36,16 @@
|
|||||||
<p>Add <cmd>repo-ls</cmd> command.</p>
|
<p>Add <cmd>repo-ls</cmd> command.</p>
|
||||||
</release-item>
|
</release-item>
|
||||||
|
|
||||||
|
<release-item>
|
||||||
|
<release-item-contributor-list>
|
||||||
|
<release-item-contributor id="stefan.fercot"/>
|
||||||
|
<release-item-contributor id="david.steele"/>
|
||||||
|
<release-item-reviewer id="cynthia.shang"/>
|
||||||
|
</release-item-contributor-list>
|
||||||
|
|
||||||
|
<p>Add <cmd>repo-get</cmd> command.</p>
|
||||||
|
</release-item>
|
||||||
|
|
||||||
<release-item>
|
<release-item>
|
||||||
<release-item-contributor-list>
|
<release-item-contributor-list>
|
||||||
<release-item-contributor id="stefan.fercot"/>
|
<release-item-contributor id="stefan.fercot"/>
|
||||||
|
@ -297,14 +297,32 @@ static const unsigned char helpDataPack[] =
|
|||||||
|
|
||||||
// repo-get command
|
// repo-get command
|
||||||
// -------------------------------------------------------------------------------------------------------------------------
|
// -------------------------------------------------------------------------------------------------------------------------
|
||||||
pckTypeBool << 4 | 0x08, // Internal
|
pckTypeStr << 4 | 0x09, 0x1C, // Summary
|
||||||
pckTypeStr << 4 | 0x08, 0x1F, // Summary
|
0x47, 0x65, 0x74, 0x20, 0x66, 0x69, 0x6C, 0x65, 0x73, 0x20, 0x66, 0x72, 0x6F, 0x6D, 0x20, 0x61, 0x20, 0x72, 0x65, 0x70,
|
||||||
0x47, 0x65, 0x74, 0x20, 0x61, 0x20, 0x66, 0x69, 0x6C, 0x65, 0x20, 0x66, 0x72, 0x6F, 0x6D, 0x20, 0x74, 0x68, 0x65, 0x20,
|
0x6F, 0x73, 0x69, 0x74, 0x6F, 0x72, 0x79, 0x2E,
|
||||||
0x72, 0x65, 0x70, 0x6F, 0x73, 0x69, 0x74, 0x6F, 0x72, 0x79, 0x2E,
|
pckTypeStr << 4 | 0x08, 0xA2, 0x03, // Description
|
||||||
pckTypeStr << 4 | 0x08, 0x3A, // Description
|
|
||||||
0x53, 0x69, 0x6D, 0x69, 0x6C, 0x61, 0x72, 0x20, 0x74, 0x6F, 0x20, 0x74, 0x68, 0x65, 0x20, 0x75, 0x6E, 0x69, 0x78, 0x20,
|
0x53, 0x69, 0x6D, 0x69, 0x6C, 0x61, 0x72, 0x20, 0x74, 0x6F, 0x20, 0x74, 0x68, 0x65, 0x20, 0x75, 0x6E, 0x69, 0x78, 0x20,
|
||||||
0x63, 0x61, 0x74, 0x20, 0x63, 0x6F, 0x6D, 0x6D, 0x61, 0x6E, 0x64, 0x20, 0x62, 0x75, 0x74, 0x20, 0x6F, 0x70, 0x74, 0x69,
|
0x63, 0x61, 0x74, 0x20, 0x63, 0x6F, 0x6D, 0x6D, 0x61, 0x6E, 0x64, 0x20, 0x62, 0x75, 0x74, 0x20, 0x77, 0x6F, 0x72, 0x6B,
|
||||||
0x6F, 0x6E, 0x73, 0x20, 0x61, 0x72, 0x65, 0x20, 0x64, 0x69, 0x66, 0x66, 0x65, 0x72, 0x65, 0x6E, 0x74, 0x2E,
|
0x73, 0x20, 0x6F, 0x6E, 0x20, 0x61, 0x6E, 0x79, 0x20, 0x73, 0x75, 0x70, 0x70, 0x6F, 0x72, 0x74, 0x65, 0x64, 0x20, 0x72,
|
||||||
|
0x65, 0x70, 0x6F, 0x73, 0x69, 0x74, 0x6F, 0x72, 0x79, 0x20, 0x74, 0x79, 0x70, 0x65, 0x2E, 0x20, 0x54, 0x68, 0x69, 0x73,
|
||||||
|
0x20, 0x63, 0x6F, 0x6D, 0x6D, 0x61, 0x6E, 0x64, 0x20, 0x69, 0x73, 0x20, 0x70, 0x72, 0x69, 0x6D, 0x61, 0x72, 0x69, 0x6C,
|
||||||
|
0x79, 0x20, 0x66, 0x6F, 0x72, 0x20, 0x61, 0x64, 0x6D, 0x69, 0x6E, 0x69, 0x73, 0x74, 0x72, 0x61, 0x74, 0x69, 0x6F, 0x6E,
|
||||||
|
0x2C, 0x20, 0x69, 0x6E, 0x76, 0x65, 0x73, 0x74, 0x69, 0x67, 0x61, 0x74, 0x69, 0x6F, 0x6E, 0x2C, 0x20, 0x61, 0x6E, 0x64,
|
||||||
|
0x20, 0x74, 0x65, 0x73, 0x74, 0x69, 0x6E, 0x67, 0x2E, 0x20, 0x49, 0x74, 0x20, 0x69, 0x73, 0x20, 0x6E, 0x6F, 0x74, 0x20,
|
||||||
|
0x61, 0x20, 0x72, 0x65, 0x71, 0x75, 0x69, 0x72, 0x65, 0x64, 0x20, 0x70, 0x61, 0x72, 0x74, 0x20, 0x6F, 0x66, 0x20, 0x61,
|
||||||
|
0x20, 0x6E, 0x6F, 0x72, 0x6D, 0x61, 0x6C, 0x20, 0x70, 0x67, 0x42, 0x61, 0x63, 0x6B, 0x52, 0x65, 0x73, 0x74, 0x20, 0x73,
|
||||||
|
0x65, 0x74, 0x75, 0x70, 0x2E, 0x0A, 0x0A,
|
||||||
|
0x49, 0x66, 0x20, 0x74, 0x68, 0x65, 0x20, 0x72, 0x65, 0x70, 0x6F, 0x73, 0x69, 0x74, 0x6F, 0x72, 0x79, 0x20, 0x69, 0x73,
|
||||||
|
0x20, 0x65, 0x6E, 0x63, 0x72, 0x79, 0x70, 0x74, 0x65, 0x64, 0x20, 0x74, 0x68, 0x65, 0x6E, 0x20, 0x72, 0x65, 0x70, 0x6F,
|
||||||
|
0x2D, 0x67, 0x65, 0x74, 0x20, 0x77, 0x69, 0x6C, 0x6C, 0x20, 0x61, 0x75, 0x74, 0x6F, 0x6D, 0x61, 0x74, 0x69, 0x63, 0x61,
|
||||||
|
0x6C, 0x6C, 0x79, 0x20, 0x64, 0x65, 0x63, 0x72, 0x79, 0x70, 0x74, 0x20, 0x74, 0x68, 0x65, 0x20, 0x66, 0x69, 0x6C, 0x65,
|
||||||
|
0x2E, 0x20, 0x46, 0x69, 0x6C, 0x65, 0x73, 0x20, 0x61, 0x72, 0x65, 0x20, 0x6E, 0x6F, 0x74, 0x20, 0x61, 0x75, 0x74, 0x6F,
|
||||||
|
0x6D, 0x61, 0x74, 0x69, 0x63, 0x61, 0x6C, 0x6C, 0x79, 0x20, 0x64, 0x65, 0x63, 0x6F, 0x6D, 0x70, 0x72, 0x65, 0x73, 0x73,
|
||||||
|
0x65, 0x64, 0x20, 0x62, 0x75, 0x74, 0x20, 0x74, 0x68, 0x65, 0x20, 0x6F, 0x75, 0x74, 0x70, 0x75, 0x74, 0x20, 0x63, 0x61,
|
||||||
|
0x6E, 0x20, 0x62, 0x65, 0x20, 0x70, 0x69, 0x70, 0x65, 0x64, 0x20, 0x74, 0x68, 0x72, 0x6F, 0x75, 0x67, 0x68, 0x20, 0x74,
|
||||||
|
0x68, 0x65, 0x20, 0x61, 0x70, 0x70, 0x72, 0x6F, 0x70, 0x72, 0x69, 0x61, 0x74, 0x65, 0x20, 0x64, 0x65, 0x63, 0x6F, 0x6D,
|
||||||
|
0x70, 0x72, 0x65, 0x73, 0x73, 0x69, 0x6F, 0x6E, 0x20, 0x63, 0x6F, 0x6D, 0x6D, 0x61, 0x6E, 0x64, 0x2C, 0x20, 0x65, 0x2E,
|
||||||
|
0x67, 0x2E, 0x20, 0x67, 0x7A, 0x69, 0x70, 0x20, 0x2D, 0x64, 0x2E,
|
||||||
|
|
||||||
// repo-ls command
|
// repo-ls command
|
||||||
// -------------------------------------------------------------------------------------------------------------------------
|
// -------------------------------------------------------------------------------------------------------------------------
|
||||||
|
@ -34,6 +34,7 @@ testRun(void)
|
|||||||
" expire Expire backups that exceed retention.\n"
|
" expire Expire backups that exceed retention.\n"
|
||||||
" help Get help.\n"
|
" help Get help.\n"
|
||||||
" info Retrieve information about backups.\n"
|
" info Retrieve information about backups.\n"
|
||||||
|
" repo-get Get files from a repository.\n"
|
||||||
" repo-ls List files in a repository.\n"
|
" repo-ls List files in a repository.\n"
|
||||||
" restore Restore a database cluster.\n"
|
" restore Restore a database cluster.\n"
|
||||||
" stanza-create Create the required stanza data.\n"
|
" stanza-create Create the required stanza data.\n"
|
||||||
|
Loading…
Reference in New Issue
Block a user