1
0
mirror of https://github.com/pgbackrest/pgbackrest.git synced 2025-11-06 08:49:29 +02:00
Files
pgbackrest/src/command/archive/push/file.h
David Steele a1280c41e5 Refactor archive-push command warnings to work like archive-get.
Warnings are logged individually in the async log rather than all together.
2021-02-26 15:58:11 -05:00

37 lines
1.8 KiB
C

/***********************************************************************************************************************************
Archive Push File
***********************************************************************************************************************************/
#ifndef COMMAND_ARCHIVE_PUSH_FILE_H
#define COMMAND_ARCHIVE_PUSH_FILE_H
#include "common/compress/helper.h"
#include "common/crypto/common.h"
#include "common/type/string.h"
#include "storage/storage.h"
/***********************************************************************************************************************************
Structure to hold information for each repository the archive file will be pushed to. An array of these must be passed to
archivePushFile() with size equal to cfgOptionGroupIdxTotal(cfgOptGrpRepo).
***********************************************************************************************************************************/
typedef struct ArchivePushFileRepoData
{
const String *archiveId;
CipherType cipherType;
const String *cipherPass;
} ArchivePushFileRepoData;
/***********************************************************************************************************************************
Functions
***********************************************************************************************************************************/
typedef struct ArchivePushFileResult
{
StringList *warnList; // Warnings from a successful operation
} ArchivePushFileResult;
// Copy a file from the source to the archive
ArchivePushFileResult archivePushFile(
const String *walSource, unsigned int pgVersion, uint64_t pgSystemId, const String *archiveFile, CompressType compressType,
int compressLevel, const ArchivePushFileRepoData *repoData);
#endif