mirror of
https://github.com/postgrespro/pg_probackup.git
synced 2026-06-21 01:34:15 +02:00
Implement remove ARCHIVE commands
This commit is contained in:
+1
-1
@@ -55,7 +55,7 @@ do_archive_push(char *wal_file_path, char *wal_file_name, bool overwrite)
|
|||||||
system_id);
|
system_id);
|
||||||
|
|
||||||
/* Create 'archlog_path' directory. Do nothing if it already exists. */
|
/* 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(absolute_wal_file_path, current_dir, wal_file_path);
|
||||||
join_path_components(backup_wal_file_path, arclog_path, wal_file_name);
|
join_path_components(backup_wal_file_path, arclog_path, wal_file_name);
|
||||||
|
|||||||
+4
-3
@@ -347,7 +347,8 @@ main(int argc, char *argv[])
|
|||||||
elog(ERROR, "-B, --backup-path must be an absolute path");
|
elog(ERROR, "-B, --backup-path must be an absolute path");
|
||||||
|
|
||||||
if (IsSshConnection()
|
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 (remote_agent) {
|
||||||
if (backup_subcmd != BACKUP_CMD) {
|
if (backup_subcmd != BACKUP_CMD) {
|
||||||
@@ -357,8 +358,8 @@ main(int argc, char *argv[])
|
|||||||
fio_redirect(STDIN_FILENO, STDOUT_FILENO);
|
fio_redirect(STDIN_FILENO, STDOUT_FILENO);
|
||||||
} else {
|
} else {
|
||||||
/* Execute remote probackup */
|
/* Execute remote probackup */
|
||||||
int status = remote_execute(argc, argv, backup_subcmd == BACKUP_CMD);
|
int status = remote_execute(argc, argv, backup_subcmd == BACKUP_CMD || backup_subcmd == ARCHIVE_PUSH_CMD);
|
||||||
if (status != 0)
|
if (status != 0 || backup_subcmd == ARCHIVE_PUSH_CMD)
|
||||||
{
|
{
|
||||||
return status;
|
return status;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user