Procházet zdrojové kódy

Creation of backup guide

Filled with first attempts.
DricomDragon před 5 roky
rodič
revize
1b8bba350c
1 změnil soubory, kde provedl 41 přidání a 0 odebrání
  1. 41 0
      Guides/backup.md

+ 41 - 0
Guides/backup.md

@@ -0,0 +1,41 @@
+# Backup
+
+How to back up server services.
+
+## Prepare
+
+```sql
+CREATE ROLE backup WITH
+    NOSUPERUSER
+    NOCREATEDB
+    NOCREATEROLE 
+    PASSWORD 'tropcool'
+    LOGIN
+    ;
+```
+
+### Probably does not work
+Add in the file `pg_hba.conf` :
+```
+local all backup trust
+```
+
+Reload with `SELECT pg_reload_conf();`.
+
+### Probably works
+
+With _postgres_ : `GRANT SELECT ON ALL TABLES IN SCHEMA public TO backup;`
+
+Connect with `sudo -u postgres psql --username=backup --host localhost --dbname=kanboard_db`
+
+`pg_dump kanboard_db --username=backup --host=localhost > dumpfile.test`
+
+Does not work because backup can't access sequences.
+
+## Backup
+
+See `ServerScripts/Backup`.
+
+## Automate
+
+Use Jenkins.