Skip to content

Возникает ошибка Restore destination is not empty при попытке воспользоваться pgprobackup restore #476

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
OutofZodiac opened this issue Mar 18, 2022 · 2 comments

Comments

@OutofZodiac
Copy link

OutofZodiac commented Mar 18, 2022

bash-4.2$ pg_probackup-std-14 show -B /home/dba/folder


BACKUP INSTANCE 'node'
===================================================================================================================================
 Instance  Version  ID      Recovery Time           Mode  WAL Mode  TLI  Time   Data   WAL  Zratio  Start LSN   Stop LSN    Status
===================================================================================================================================
 node      14       R8TKXS  2022-03-16 11:10:44+07  FULL  STREAM    1/0     0  308MB  16MB    1.00  0/35000028  0/35000500  OK

bash-4.2$ pg_probackup-std-14 restore -B /home/dba/folder --instance node -i R8TKXS -D /var/lib/pgpro/std-14-sec/data -h 127.0.0.1 -p 5433 -U backup
ERROR: Restore destination is not empty: "/var/lib/pgpro/std-14-sec/data"

@kulaginm
Copy link
Member

kulaginm commented Mar 18, 2022

  1. Дайте, пожалуйста, вывод команды ls -la /var/lib/pgpro/std-14-sec/data
  2. Расскажите, а что Вы хотели сделать?

@OutofZodiac
Copy link
Author

OutofZodiac commented Mar 18, 2022

  1. Дайте, пожалуйста, вывод команды ls -la /var/lib/pgpro/std-14-sec/data
  2. Расскажите, а что Вы хотели сделать?
  1. Каталог с данными конечно же не пустой
[dba@centos-7 ~]$ sudo ls -all /var/lib/pgpro/std-14-sec/data
total 72
drwx------ 19 postgres postgres  4096 Mar  9 14:52 .
drwxr-xr-x  3 postgres postgres    18 Mar  9 09:22 ..
drwx------  7 postgres postgres    71 Mar  9 16:57 base
drwx------  2 postgres postgres  4096 Mar 15 17:21 global
drwx------  2 postgres postgres     6 Mar  9 09:22 pg_commit_ts
drwx------  2 postgres postgres     6 Mar  9 09:22 pg_dynshmem
-rw-------  1 postgres postgres  4789 Mar  9 09:22 pg_hba.conf
-rw-------  1 postgres postgres  1636 Mar  9 09:22 pg_ident.conf
drwx------  4 postgres postgres    68 Mar 15 17:24 pg_logical
drwx------  4 postgres postgres    36 Mar  9 09:22 pg_multixact
drwx------  2 postgres postgres     6 Mar  9 09:22 pg_notify
drwx------  2 postgres postgres     6 Mar  9 09:22 pg_replslot
drwx------  2 postgres postgres     6 Mar  9 09:22 pg_serial
drwx------  2 postgres postgres     6 Mar  9 09:22 pg_snapshots
drwx------  2 postgres postgres     6 Mar  9 14:52 pg_stat
drwx------  2 postgres postgres    84 Mar 18 22:45 pg_stat_tmp
drwx------  2 postgres postgres    18 Mar  9 09:22 pg_subtrans
drwx------  2 postgres postgres     6 Mar  9 09:22 pg_tblspc
drwx------  2 postgres postgres     6 Mar  9 09:22 pg_twophase
-rw-------  1 postgres postgres     3 Mar  9 09:22 PG_VERSION
drwx------  3 postgres postgres  4096 Mar  9 17:11 pg_wal
drwx------  2 postgres postgres    18 Mar  9 09:22 pg_xact
-rw-------  1 postgres postgres    88 Mar  9 09:22 postgresql.auto.conf
-rw-------  1 postgres postgres 28937 Mar  9 14:38 postgresql.conf
-rw-------  1 postgres postgres    69 Mar  9 14:52 postmaster.opts
-rw-------  1 postgres postgres    96 Mar  9 14:52 postmaster.pid
  1. Предполагаю, что я должен очистить данные кластера, на который я собираюсь производить восстановление.

upd: стер данные кластера и поменял порт

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants