ossc-db / pg_rman

Backup and restore management tool for PostgreSQL
http://ossc-db.github.io/pg_rman/index.html
Other
476 stars 77 forks source link

hard-copy seems not work as expected #236

Closed necsk closed 1 year ago

necsk commented 1 year ago

hay,

I use pg_rman 1.3.14. after a full backup i try test restore using --hard-copy but after restore is done, when i list the arclog folder, its sym-link, but not copy.

Am I missing something, any help would be appreciate and thank you all.

the following is the log&commands:

restore command

sudo pg_rman --pgdata=/var/lib/pgsql/cdata/base/userdata --backup-path=/cbackup/cis/physical/data --arclog-path /var/lib/pgsql/cdata/base/arclog --srvlog-path /var/log/cis/cdb/base/pg_log --hard-copy restore

after restore ,i list arclog folder

[root@ip-10-1-2-75 ~]# ls -al /var/lib/pgsql/cdata/base/arclog/ total 0 drwx------. 2 265561 265561 150 Nov 16 11:01 . drwxr-xr-x. 4 265561 265561 59 Nov 16 10:12 .. lrwxrwxrwx. 1 root root 74 Nov 16 11:01 000000010000000000000001 -> /cbackup/cis/physical/data/20221116/103649/arclog/000000010000000000000001 lrwxrwxrwx. 1 root root 74 Nov 16 11:01 000000010000000000000002 -> /cbackup/cis/physical/data/20221116/103649/arclog/000000010000000000000002 lrwxrwxrwx. 1 root root 74 Nov 16 11:01 000000010000000000000003 -> /cbackup/cis/physical/data/20221116/103649/arclog/000000010000000000000003 lrwxrwxrwx. 1 root root 90 Nov 16 11:01 000000010000000000000003.00000028.backup -> /cbackup/cis/physical/data/20221116/103649/arclog/000000010000000000000003.00000028.backup

edited 2022/11/16 I tried a lot and found that if I append hard_copy=true to pg_rman.ini and it worked as expected now. dont know why.

mikecaat commented 1 year ago

Thanks for reporting. The behavior is bug and I made the PR to fix it.