Skip to content

Commit

Permalink
add http_send_timeout=300, http_receive_timeout=300 to embedded backu…
Browse files Browse the repository at this point in the history
…p/restore operations
  • Loading branch information
Slach committed Jun 11, 2024
1 parent 3b3c805 commit 8c36148
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 3 deletions.
3 changes: 3 additions & 0 deletions ChangeLog.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
# v2.5.14
IMPROVEMENTS
- add http_send_timeout=300, http_receive_timeout=300 to embedded backup/restore operations

BUG FIXES
- remove too aggressive logs for object disk upload and download operations during create and restore commands execution

Expand Down
2 changes: 1 addition & 1 deletion pkg/backup/create.go
Original file line number Diff line number Diff line change
Expand Up @@ -522,7 +522,7 @@ func (b *Backuper) generateEmbeddedBackupSQL(ctx context.Context, backupName str
return "", nil, err
}
backupSQL := fmt.Sprintf("BACKUP %s TO %s", tablesSQL, embeddedBackupLocation)
var backupSettings []string
backupSettings := []string{"http_send_timeout=300", "http_receive_timeout=300"}
if schemaOnly {
backupSettings = append(backupSettings, "structure_only=1")
}
Expand Down
4 changes: 2 additions & 2 deletions pkg/backup/restore.go
Original file line number Diff line number Diff line change
Expand Up @@ -170,7 +170,7 @@ func (b *Backuper) Restore(backupName, tablePattern string, databaseMapping, par
return err
}
if err = b.dst.Connect(ctx); err != nil {
return fmt.Errorf("restoreBackupEmbedded: can't connect to %s: %v", b.dst.Kind(), err)
return fmt.Errorf("BackupDestination for embedded or object disk: can't connect to %s: %v", b.dst.Kind(), err)
}
defer func() {
if err := b.dst.Close(ctx); err != nil {
Expand Down Expand Up @@ -1540,7 +1540,7 @@ func (b *Backuper) restoreEmbedded(ctx context.Context, backupName string, schem
}
}
}
var settings []string
settings := []string{"http_send_timeout=300", "http_receive_timeout=300"}
if schemaOnly {
settings = append(settings, "structure_only=1")
}
Expand Down

0 comments on commit 8c36148

Please sign in to comment.