Yes,I already checked the Documentation of postgres (backup &restore)
That’s CronJob is not working as per the schedule.
2023-07-03 05:33:43,098 INFO: no action. I am (pgdb-pg-db-repl2-5ff574665b-hfzc8), a secondary, and following a leader (pgdb-pg-db-7f78f9dfd8-qqw8t)
NWRAP_ERROR(1) - nwrap_files_cache_reload: Unable to open '/tmp/nss_wrapper/pgbackrest-repo/passwd' readonly -1:No such file or directory
NWRAP_ERROR(1) - nwrap_files_getpwuid: Error loading passwd file
nss_wrapper: user exists
nss_wrapper: group exists
nss_wrapper: environment configured
Starting the pgBackRest repo
nss_wrapper: ssh configured
creating /backrestrepo/pgdb-pg-db-backrest-shared-repo
The pgBackRest repo has been started
WARNING: 'UsePAM no' is not supported in Fedora and may cause several problems.
nss_wrapper: user exists
nss_wrapper: group exists
nss_wrapper: environment configured
Fri Jun 30 07:46:56 UTC 2023 INFO: Image mode found: pgbackrest
Fri Jun 30 07:46:56 UTC 2023 INFO: Starting in 'pgbackrest' mode
time="2023-06-30T07:46:56Z" level=info msg="crunchy-pgbackrest starts"
time="2023-06-30T07:46:56Z" level=info msg="debug flag set to false"
time="2023-06-30T07:46:56Z" level=info msg="backrest backup command requested"
time="2023-06-30T07:46:56Z" level=info msg="backrest command will be executed for both local and s3 storage"
time="2023-06-30T07:46:56Z" level=info msg="command to execute is [pgbackrest backup --type=full --db-host=10.4.1.137 --db-path=/pgdata/pgdb-pg-db ; pgbackrest backup --type=full --db-host=10.4.1.137 --db-path=/pgdata/pgdb-pg-db --repo1-type=s3 --no-repo1-s3-verify-tls]"
time="2023-06-30T07:48:12Z" level=info msg="output=[]"
time="2023-06-30T07:48:12Z" level=info msg="stderr=[WARN: option 'repo1-retention-full' is not set for 'repo1-retention-full-type=count', the repository may run out of space\n HINT: to retain full backups indefinitely (without warning), set option 'repo1-retention-full' to the maximum.\nWARN: option 'repo1-retention-full' is not set for 'repo1-retention-full-type=count', the repository may run out of space\n HINT: to retain full backups indefinitely (without warning), set option 'repo1-retention-full' to the maximum.\n]"
time="2023-06-30T07:48:12Z" level=info msg="crunchy-pgbackrest ends"
# backup type can be:
# Differential: Create a backup of everything since the last full backup was taken
# --type=diff
# Full: Back up the entire database
# --type=full
# Incremental: Back up everything since the last backup was taken, whether it was full, differential, or incremental
# --type=incr
# backup retention can be:
# --repo1-retention-full=2 how many full backups to retain
# --repo1-retention-diff=4 how many differential backups to retain
# --repo1-retention-archive=6 how many sets of WAL archives to retain alongside
# the full and differential backups that are retained
apiVersion: pg.percona.com/v1
kind: Pgtask
metadata:
labels:
pg-cluster: pg-db
pgouser: admin
name: pg-db-backrest-full-backup
spec:
name: pg-db-backrest-full-backup
parameters:
backrest-command: backup
# backup type can be:
# Differential: Create a backup of everything since the last full backup was taken
# --type=diff
# Full: Back up the entire database
# --type=full
# Incremental: Back up everything since the last backup was taken, whether it was full, differential, or incremental
# --type=incr
# backup retention can be:
# --repo1-retention-full=2 how many full backups to retain
# --repo1-retention-diff=4 how many differential backups to retain
# --repo1-retention-archive=6 how many sets of WAL archives to retain alongside
# the full and differential backups that are retained
backrest-opts: --type=full --repo1-retention-full=20
backrest-s3-verify-tls: "false"
backrest-storage-type: "s3"
job-name: pg-db-backrest-full-backup
pg-cluster: pg-db
tasktype: backrest
Please give us more info on what is wrong with your setup? Your backup logs are showing the backup was done, do you have files in s3 bucket?
Warning about disk space is not important and will go away if you add args --type=full --repo1-retention-full=20 to the backup job.
You can save my previous post code to backup.yml and deploy it to kubernetes (adjust the parameters)