--- title: "[bojemoi] fix(ip2location): restauration complète DB + gameover préserve volume postgres" date: 2026-05-19T15:16:36+02:00 draft: false tags: ["commit", "bojemoi", "main"] categories: ["Git Activity"] summary: "Commit 2de9369 par Betty dans bojemoi" author: "Betty" --- ## Commit `2de9369` | | | |---|---| | **Repository** | bojemoi | | **Branch** | `main` | | **Author** | Betty | | **Hash** | `2de9369434b9500902dcd3088f0736c3bc498e08` | ### Description - gameover.sh: exclut le volume "bojemoi" (postgres data) du docker volume prune → évite la perte des données à chaque gameover/startover - volumes/postgres/init/02-ip2location-schema.sql: schéma ip2location versionné → ip2location_db1, ip2location_db1_v6, asn_lite, asn_exclude, asn_exclude_ranges → exécuté automatiquement au 1er démarrage du container postgres - scripts/import_dbip_country.py: import DB-IP Country Lite (702k lignes) → convertit les plages IP en CIDRs via ipaddress.summarize_address_range → peuple ip2location_db1 (590k IPv4) et ip2location_db1_v6 (779k IPv6) - borodino/update-asn-db.sh: 3 corrections → COPY → \copy (client-side) pour éviter "file not found" côté serveur → REFRESH MATERIALIZED VIEW asn_exclude_ranges après recalcul asn_exclude → ajout mise à jour mensuelle DB-IP Country Lite via import_dbip_country.py Co-Authored-By: Claude Sonnet 4.6 ### Files Changed ``` M borodino/update-asn-db.sh M scripts/gameover.sh A scripts/import_dbip_country.py A volumes/postgres/init/02-ip2location-schema.sql ``` ### Diff Summary ``` borodino/update-asn-db.sh | 51 +++++++--- scripts/gameover.sh | 5 +- scripts/import_dbip_country.py | 119 ++++++++++++++++++++++++ volumes/postgres/init/02-ip2location-schema.sql | 60 ++++++++++++ 4 files changed, 222 insertions(+), 13 deletions(-) ```