pg_probackup
pg_probackup copied to clipboard
pg_probackup restore to local path
Make pg_probackup restore from mounted store to local path without agent?
For example
/mnr/backups - mount store with backups /path - somthing empty path wanting to restore
I tried it pg_probackup-11 restore -B /mnt/backups/ --instance some_inst -D /path
But I get this error ERROR: Agent error: Permission denied
If "some_inst" is not avaliable?
I want to restore without ssh agent.
Mmmm. I understand. Those backups has config here /mnt/backups/backups/some_inst/pg_probackup.conf
This config has
...
# Remote access parameters
remote-proto = ssh
remote-host = some_host
remote-user = postgres
How to ignore this config if I do not to remove it?
Yes!!! I commented strings (see above comment). This works!!!
Hello! It is a consequence of an old bug, fixed in 2.3.0 version:
The add-instance command no longer implicitly sets the --remote-proto and --remote-host parameters in the instance configuration when adding a remote PostgreSQL instance into the backup catalog.
At this point only old installations are affected by it.
Yes!!! I commented strings (see above comment). This works!!!
The recommended way would be to use set-config
command to unset this parameter:
pg_probackup set-config --instance some_inst --remote-host=none
... or overwrite it on command line, when running restore
:
pg_probackup restore ... --remote-host=none
Sorry for taking so long with response.
ERROR: Agent error: ssh: Could not resolve hostname none: Name or service not known
I ser --remote-proto none
without --remote-host=none
This is work for me!!! Its gooooood! Thanks!
ERROR: Agent error: ssh: Could not resolve hostname none: Name or service not known
wow, looks like a bug to me
most likely this is due to the specified setting in the config
# Remote access parameters
**remote-proto = ssh**
remote-host = some_host
remote-user = postgres
If you set --remote-host none
, but --remote-proto
remain as ssh
(because it set in config)
mmm. From console --help
--remote-proto=protocol remote protocol to use
available options: 'ssh', 'none' (**default: ssh**)
none
should be treated as a special value for remote-host
, and a range of allowed values for remote-proto
should be limited to ssh
and none
.
None of this conditions are enforced right now, which is baaad
Will be fixed in 2.4.15