mirror of
https://github.com/postgrespro/pg_probackup.git
synced 2025-02-03 14:01:57 +02:00
Implement remove ARCHIVE commands
This commit is contained in:
parent
58373a5e17
commit
ae5aa3db73
@ -55,7 +55,7 @@ do_archive_push(char *wal_file_path, char *wal_file_name, bool overwrite)
|
||||
system_id);
|
||||
|
||||
/* Create 'archlog_path' directory. Do nothing if it already exists. */
|
||||
dir_create_dir(arclog_path, DIR_PERMISSION);
|
||||
fio_mkdir(arclog_path, DIR_PERMISSION, FIO_BACKUP_HOST);
|
||||
|
||||
join_path_components(absolute_wal_file_path, current_dir, wal_file_path);
|
||||
join_path_components(backup_wal_file_path, arclog_path, wal_file_name);
|
||||
|
@ -347,7 +347,8 @@ main(int argc, char *argv[])
|
||||
elog(ERROR, "-B, --backup-path must be an absolute path");
|
||||
|
||||
if (IsSshConnection()
|
||||
&& (backup_subcmd == BACKUP_CMD || backup_subcmd == ADD_INSTANCE_CMD || backup_subcmd == RESTORE_CMD))
|
||||
&& (backup_subcmd == BACKUP_CMD || backup_subcmd == ADD_INSTANCE_CMD || backup_subcmd == RESTORE_CMD ||
|
||||
backup_subcmd == ARCHIVE_PUSH_CMD || backup_subcmd == ARCHIVE_GET_CMD))
|
||||
{
|
||||
if (remote_agent) {
|
||||
if (backup_subcmd != BACKUP_CMD) {
|
||||
@ -357,8 +358,8 @@ main(int argc, char *argv[])
|
||||
fio_redirect(STDIN_FILENO, STDOUT_FILENO);
|
||||
} else {
|
||||
/* Execute remote probackup */
|
||||
int status = remote_execute(argc, argv, backup_subcmd == BACKUP_CMD);
|
||||
if (status != 0)
|
||||
int status = remote_execute(argc, argv, backup_subcmd == BACKUP_CMD || backup_subcmd == ARCHIVE_PUSH_CMD);
|
||||
if (status != 0 || backup_subcmd == ARCHIVE_PUSH_CMD)
|
||||
{
|
||||
return status;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user