Skip to content
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

add the restriction to the manual #220

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

huangfumingyue
Copy link
Contributor

When pg_rman backup with --keep-data-generations 0,
All backup files will be deleted, including the current backup file.
It is the correct behavior, but we need to careful,
so we add this case to the manual as restrictions.
#206

@mikecaat
Copy link
Contributor

mikecaat commented Mar 8, 2022

Thanks. Are --keep-data-days, --keep-arclog-days and --keep-srvlog-days the same behavior?

@huangfumingyue
Copy link
Contributor Author

huangfumingyue commented Mar 8, 2022

--keep-data-days, --keep-arclog-days and --keep-srvlog-days are not the same behavior.
I test it.

・--keep-data-days

-bash-4.2$ pg_rman show
=====================================================================
 StartTime           EndTime              Mode    Size   TLI  Status
=====================================================================
2022-02-15 16:49:27  2022-02-15 16:49:53  FULL   558MB     1  DONE

-bash-4.2$ pg_rman backup -b full --keep-data-days=0
INFO: copying database files
INFO: copying archived WAL files
INFO: backup complete
INFO: Please execute 'pg_rman validate' to verify the files are correctly copied.
INFO: start deleting old backup (keep after = 2022-02-15 00:00:00)
INFO: does not include the backup just taken
INFO: backup "2022-02-15 16:49:27" should be kept
DETAIL: This is taken after "2022-02-15 00:00:00".
-bash-4.2$ ^C
-bash-4.2$ pg_rman show
=====================================================================
 StartTime           EndTime              Mode    Size   TLI  Status
=====================================================================
2022-02-15 16:50:56  2022-02-15 16:51:29  FULL   693MB     1  DONE
2022-02-15 16:49:27  2022-02-15 16:49:53  FULL   558MB     1  OK

・--keep-arclog-files

-bash-4.2$ cd arclog
-bash-4.2$ ls
00000001000000000000002B  000000010000000000000036
00000001000000000000002C  000000010000000000000037
00000001000000000000002D  000000010000000000000038
00000001000000000000002E  000000010000000000000039
00000001000000000000002F  00000001000000000000003A
000000010000000000000030  00000001000000000000003B
000000010000000000000031  00000001000000000000003C
000000010000000000000032  00000001000000000000003D
000000010000000000000033  000000010000000000000040
000000010000000000000034  000000010000000000000041
000000010000000000000035  000000010000000000000041.00000028.backup

-bash-4.2$ pg_rman backup -b full --keep-arclog-files=0
-bash-4.2$ cd arclog
-bash-4.2$ ls
000000010000000000000042  000000010000000000000043.00000028.backup
000000010000000000000043


・--keep-arclog-days

-bash-4.2$ pg_rman backup -b full --keep-arclog-days=0
-bash-4.2$ cd arclog
-bash-4.2$ ls
000000010000000000000044  000000010000000000000045.00000028.backup
000000010000000000000045

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

Successfully merging this pull request may close these issues.

2 participants