Skip to content

armgit / zulip

Public Imported from GitHub
0

Zulip server and web application. Open-source team chat that helps teams stay productive and focused.

docs: Break out and clarify wal-g backup configuration.

Alex Vandiver2c26ad371412
diff --git a/docs/production/deployment.md b/docs/production/deployment.md
index c338c570f82..8c455270253 100644
--- a/docs/production/deployment.md
+++ b/docs/production/deployment.md
@@ -529,7 +529,7 @@ If you are using password authentication, you can set a
`/etc/zulip/zulip-secrets.conf`.
[warm-standby]: https://www.postgresql.org/docs/current/warm-standby.html
-[wal-g]: export-and-import.md#backup-details
+[wal-g]: export-and-import.md#database-only-backup-tools
## System and deployment configuration
diff --git a/docs/production/export-and-import.md b/docs/production/export-and-import.md
index 28a73f01a16..bccf095360a 100644
--- a/docs/production/export-and-import.md
+++ b/docs/production/export-and-import.md
@@ -161,25 +161,9 @@ included in the backups generated by Zulip's standard tools. The
data includes:
- The PostgreSQL database. You can back this up with any standard
- database export or backup tool. Zulip has built-in support for taking
- daily incremental backups using
- [wal-g](https://github.com/wal-g/wal-g); these backups are stored for
- 30 days in S3. If you have an Amazon S3 bucket you wish to store for
- storing the backups, edit `/etc/zulip/zulip-secrets.conf` on the
- PostgreSQL server to add:
-
- ```ini
- s3_region = # region to write to S3; defaults to EC2 host's region
- s3_backups_key = # aws public key; optional, if access not through role
- s3_backups_secret_key = # aws secret key; optional, if access not through role
- s3_backups_bucket = # name of S3 backup bucket
- ```
-
- After adding the secrets, run
- `/home/zulip/deployments/current/scripts/zulip-puppet-apply`. You
- can (and should) monitor that backups are running regularly via
- the Nagios plugin installed into
- `/usr/lib/nagios/plugins/zulip_postgresql_backups/check_postgresql_backup`.
+ database export or backup tool; see
+ [below](#database-only-backup-tools) for Zulip's built-in support
+ for continuous point-in-time backups.
- Any user-uploaded files. If you're using S3 as storage for file
uploads, this is backed up in S3. But if you have instead set
@@ -451,3 +435,40 @@ rm -rf /home/zulip/uploads/*/2/
```
Once that's done, you can simply re-run the import process.
+
+## Database-only backup tools
+
+The [Zulip-specific backup tool documented above](#backups) is perfect
+for an all-in-one backup solution, and can be used for nightly
+backups. For administrators wanting continuous point-in-time backups,
+Zulip has built-in support for taking daily incremental backups using
+[wal-g](https://github.com/wal-g/wal-g) and storing them in Amazon S3.
+By default, these backups are stored for 30 days.
+
+Note these database backups, by themselves, do not constitute a full
+backup of the Zulip system! [See above](#backup-details) for other
+pieces which are necessary to back up a Zulip system.
+
+To enable continuous point-in-time backups:
+
+1. Edit `/etc/zulip/zulip-secrets.conf` on the
+ PostgreSQL server to add:
+
+```ini
+s3_region = # region to write to S3; defaults to EC2 host's region
+s3_backups_key = # aws public key; optional, if access not through role
+s3_backups_secret_key = # aws secret key; optional, if access not through role
+s3_backups_bucket = # name of S3 backup bucket
+```
+
+1. Run `/home/zulip/deployments/current/scripts/zulip-puppet-apply`.
+
+Daily full-database backups will be taken at 0200 UTC, and every WAL
+log will be written to S3 as it is saved by PostgreSQL; by default,
+this happens every 5 minutes, or every 1G, whichever happens first.
+If you need always-current backup availability, Zulip also has
+[built-in database replication support](deployment.md#postgresql-warm-standby).
+
+You can (and should) monitor that backups are running regularly via
+the Nagios plugin installed into
+`/usr/lib/nagios/plugins/zulip_postgresql_backups/check_postgresql_backup`.