-
Notifications
You must be signed in to change notification settings - Fork 77
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
Issue when trying to create a full backup after restore the database to point in time #252
Comments
Please give me any update? |
Hi, I have tried it may not be the same procedure, but
|
postgres=# show archive_command; postgres=# show log_directory; echo $BACKUP_PATH pg_rman init cat backups/pg_rman.ini BACKUP_MODE = F pg_rman backup pg_rman validate pg_rman show pg_rman show 2023-10-12 06:43:20 sv force-stop /opt/pdbelsng/services/pdbelsng_adm pg_rman restore '2023-10-12 06:43:23' sv start /opt/pdbelsng/services/pdbelsng_adm pdbelsng$ pg_rman backup This is the procedure. The last step cannot finish. Try to do a backup after restoring. Maybe the timelineID is different, I don't know. Could you please check the error and give me any update? PostgreSQL version: |
Can you try to use the different path for archive_command and pg_rman? For example, try to change |
Thank you. Now is working. Could you please explain then why we have backup folder and in this folder we have pg_wal and srvlog folders? When I try to use pg_wal folder from archive_command as you see I receive an error? drwx------. 5 pdbelsng_adm pdbelsng_adm 4096 Oct 12 07:21 . |
The reason is that pg_rman takes backup of the wal and server logs.
Sorry, I don't have enough time to investigate the detail. But I assume that the pg_rman deleted the Anyway, you need to prepare empty directory( |
After restoring the database, I want to do a backup again but I receive this error:
cat pg_rman.ini
ARCLOG_PATH='/opt/pdbelsng/backups/backup/pg_wal'
SRVLOG_PATH='/opt/pdbelsng/data/pg_log'
BACKUP_MODE = F
COMPRESS_DATA = YES
KEEP_ARCLOG_FILES = 10
KEEP_DATA_GENERATIONS = 3
KEEP_SRVLOG_FILES = 10
postgres=# show archive_command;
archive_command
gzip < %p > /opt/pdbelsng/backups/backup/pg_wal/%f.gz
(1 row)
postgres=# show log_directory;
log_directory
pg_log
(1 row)
shell>: pg_rman backup
INFO: copying database files
INFO: copying archived WAL files
ERROR: could not open destination file "/opt/pdbelsng/backups/20231010/141025/arclog/archive_status/00000002.history.done": No such file or directory
Please suggest how to fix?
The text was updated successfully, but these errors were encountered: