Vous n'êtes pas identifié(e).
Pages : 1
bonjour
j'utilise le wal streaming ainsi que rsync en archive command.
Cela fonctionne mais j'ai un doublon dans mes fichiers wal qui ne sont pas supprimer lors d'un delete de backup.
voici un exemple :
barman backup postgres
Starting backup using rsync-exclusive method for server postgres in /backup/barman/base/20191202T174330
Backup start at LSN: A/3F000028 (000000010000000A0000003F, 00000028)
Starting backup copy via rsync/SSH for 20191202T174330
Copy done (time: 3 seconds)
Asking PostgreSQL server to finalize the backup.
Backup size: 3.1 GiB. Actual size on disk: 158.9 MiB (-94.92% deduplication ratio).
Backup end at LSN: A/3F006B58 (000000010000000A0000003F, 00006B58)
Backup completed (start time: 2019-12-02 17:43:31.051648, elapsed time: 5 seconds)
Processing xlog segments from streaming for postgres
000000010000000A0000003E
000000010000000A0000003F
-bash-4.2$ barman list-backup postgres
postgres 20191202T174330 - Mon Dec 2 17:43:36 2019 - Size: 3.1 GiB - WAL Size: 0 B (tablespaces: data:/data/pgsql/data, idx:/data/pgsql/idx)
postgres 20191202T172607 - Mon Dec 2 17:26:13 2019 - Size: 3.1 GiB - WAL Size: 634.9 KiB (tablespaces: data:/data/pgsql/data, idx:/data/pgsql/idx)
postgres 20191202T172227 - Mon Dec 2 17:22:58 2019 - Size: 3.1 GiB - WAL Size: 134.1 KiB (tablespaces: data:/data/pgsql/data, idx:/data/pgsql/idx)
postgres 20191202T165859 - Mon Dec 2 16:59:54 2019 - Size: 3.1 GiB - WAL Size: 19.4 MiB (tablespaces: data:/data/pgsql/data, idx:/data/pgsql/idx)
postgres 20191202T000002 - Mon Dec 2 00:00:35 2019 - Size: 3.0 GiB - WAL Size: 64.0 MiB (tablespaces: data:/data/pgsql/data, idx:/data/pgsql/idx)
postgres 20191201T000003 - Sun Dec 1 00:00:36 2019 - Size: 2.9 GiB - WAL Size: 72.2 MiB (tablespaces: data:/data/pgsql/data, idx:/data/pgsql/idx)
postgres 20191130T000003 - Sat Nov 30 00:00:32 2019 - Size: 2.9 GiB - WAL Size: 89.0 MiB (tablespaces: data:/data/pgsql/data, idx:/data/pgsql/idx)
postgres 20191129T000002 - Fri Nov 29 00:00:41 2019 - Size: 2.8 GiB - WAL Size: 61.1 MiB (tablespaces: data:/data/pgsql/data, idx:/data/pgsql/idx)
je supprime le plus ancien :
-bash-4.2$ barman delete postgres 20191129T000002
Deleting backup 20191129T000002 for server postgres
Delete associated WAL segments:
0000000100000009000000C6
0000000100000009000000C7
0000000100000009000000C8
0000000100000009000000C9
0000000100000009000000CA
0000000100000009000000CB
0000000100000009000000CC
0000000100000009000000CD
0000000100000009000000CE
0000000100000009000000CF
0000000100000009000000D0
0000000100000009000000D1
0000000100000009000000D2
0000000100000009000000D3
0000000100000009000000D4
0000000100000009000000D5
0000000100000009000000D6
0000000100000009000000D7
0000000100000009000000D8
0000000100000009000000D9
0000000100000009000000DA
0000000100000009000000DB
0000000100000009000000DC
0000000100000009000000DD
0000000100000009000000DE
0000000100000009000000DF
0000000100000009000000E0
Deleted backup 20191129T000002 (start time: Mon Dec 2 17:45:44 2019, elapsed time: less than one second)
je fais une recherche de wal
locate 0000000100000009000000E0
/backup/incoming-wal/0000000100000009000000E0
/backup/incoming-wal/0000000100000009/0000000100000009000000E0
[root@es7-castel incoming-wal]#
je met a jour ma base locate
# updatedb
You have mail in /var/spool/mail/root
# locate 0000000100000009000000E0
/backup/incoming-wal/0000000100000009000000E0
Barman a bien supprimé le contenue du répertoire 0000000100000009
/backup/incoming-wal/0000000100000009/0000000100000009000000E0
mais par contre le wal /backup/incoming-wal/0000000100000009000000E0 est toujours présent ainsi que tout les autres
je n'arrive pas à trouver la solution pour qu'il me supprime tous les fichiers
voici la conf barman
[barman]
; System user
barman_home = /backup/barman/
barman_user = barman
log_file = /var/log/barman/barman.log
compression = gzip
reuse_backup = link
minimum_redundancy = 5
immediate_checkpoint = true
basebackup_retry_times = 3
basebackup_retry_sleep = 30
last_backup_maximum_age = 1 DAYS
[postgres]
description = "Sauvegarde postgres"
ssh_command = ssh postgres@localhost
retention_policy = RECOVERY WINDOW OF 5 days
compression = gzip
reuse_backup = link
minimum_redundancy = 1
last_backup_maximum_age = '8 days'
recovery_options = 'get-wal'
conninfo = port=5432 host=localhost user=barman dbname=postgres
archiver = on
streaming_conninfo = port=5432 host=localhost user=barman
streaming_archiver = on
streaming_archiver_name = local_barman_receive_wal
slot_name = barman_local
backup_directory = /backup/barman
basebackups_directory = /backup/barman/base
wals_directory = /backup/incoming-wal
path_prefix = /usr/pgsql-11/bin/
backup_options=exclusive_backup
backup_method = rsync
PostgreSQL.conf
wal_level = replica
archive_command = 'rsync -a %p barman@localhost:/backup/incoming-wal/%f'
je pense que c'est l'archive_command qui fait doublon mais aucune certitude la conf est en full local bdd + sauvegarde sur le même serveur ( pas recommandé mais je n'ai pas le choix. )
Par avance merci
Hors ligne
Pages : 1