1 /*********************************************************************************************************************************** 2 Backup File 3 ***********************************************************************************************************************************/ 4 #ifndef COMMAND_BACKUP_FILE_H 5 #define COMMAND_BACKUP_FILE_H 6 7 #include "common/compress/helper.h" 8 #include "common/crypto/common.h" 9 #include "common/type/keyValue.h" 10 11 /*********************************************************************************************************************************** 12 Backup file types 13 ***********************************************************************************************************************************/ 14 typedef enum 15 { 16 backupCopyResultChecksum, 17 backupCopyResultCopy, 18 backupCopyResultReCopy, 19 backupCopyResultSkip, 20 backupCopyResultNoOp, 21 } BackupCopyResult; 22 23 /*********************************************************************************************************************************** 24 Functions 25 ***********************************************************************************************************************************/ 26 // Copy a file from the PostgreSQL data directory to the repository 27 typedef struct BackupFileResult 28 { 29 BackupCopyResult backupCopyResult; 30 uint64_t copySize; 31 String *copyChecksum; 32 uint64_t repoSize; 33 KeyValue *pageChecksumResult; 34 } BackupFileResult; 35 36 BackupFileResult backupFile( 37 const String *pgFile, bool pgFileIgnoreMissing, uint64_t pgFileSize, bool pgFileCopyExactSize, const String *pgFileChecksum, 38 bool pgFileChecksumPage, uint64_t pgFileChecksumPageLsnLimit, const String *repoFile, bool repoFileHasReference, 39 CompressType repoFileCompressType, int repoFileCompressLevel, const String *backupLabel, bool delta, CipherType cipherType, 40 const String *cipherPass); 41 42 #endif 43