Skip to content

Free, Open Source, Self-Hosted WhatsApp API Gateway

fix(scripts): ignore backup archives and restore snapshots

Yudhi Armyndharis0d6d95d326d8
diff --git a/.dockerignore b/.dockerignore
index 828f2cd9f..65c209c6d 100644
--- a/.dockerignore
+++ b/.dockerignore
@@ -21,6 +21,9 @@ data/
*.db
*.sqlite
*.sqlite3
+# scripts/backup.sh archives and restore.sh safety snapshots: copies of the same state
+backups/
+**/*.pre-restore-*
# VCS metadata — not a build input; keeps history/hooks out of the context
.git/
diff --git a/.gitignore b/.gitignore
index 801a911c8..ef31c67e0 100644
--- a/.gitignore
+++ b/.gitignore
@@ -51,6 +51,9 @@ media/
uploads/
.wwebjs_auth/
.wwebjs_cache/
+# scripts/backup.sh archives and restore.sh safety snapshots: copies of the same state
+/backups/
+*.pre-restore-*
# Database
*.db
diff --git a/scripts/check-dockerignore.mjs b/scripts/check-dockerignore.mjs
index d208f7772..177a255d2 100644
--- a/scripts/check-dockerignore.mjs
+++ b/scripts/check-dockerignore.mjs
@@ -107,6 +107,11 @@ const mustReject = [
'data/.api-key',
'openwa.sqlite',
'backup.db',
+ // Backup archives and pre-restore snapshots (scripts/backup.sh, scripts/restore.sh)
+ 'backups/openwa-backup-20260101-000000.tar.gz',
+ 'data.pre-restore-20260101-000000/.api-key',
+ 'data.pre-restore-20260101-000000/baileys/s1/creds.json',
+ 'state/sessions.pre-restore-20260101-000000/session-s1/Default/Cookies',
// VCS metadata
'.git/HEAD',
'.git/hooks/pre-commit',