From 3e0a7e7f8abfcd91524a18a9f1fe443359a83133 Mon Sep 17 00:00:00 2001 From: Jeremy Stretch Date: Wed, 8 Aug 2018 09:04:48 -0400 Subject: [PATCH] Added tip about exlcuding the changelog when exporting the database --- docs/administration/replicating-netbox.md | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/docs/administration/replicating-netbox.md b/docs/administration/replicating-netbox.md index c4a916865..08e11fe56 100644 --- a/docs/administration/replicating-netbox.md +++ b/docs/administration/replicating-netbox.md @@ -7,10 +7,18 @@ NetBox uses [PostgreSQL](https://www.postgresql.org/) for its database, so gener ## Export the Database +Use the `pg_dump` utility to export the entire database to a file: + ```no-highlight pg_dump netbox > netbox.sql ``` +When replicating a production database for development purposes, you may find it convenient to exclude changelog data, which can easily account for the bulk of a database's size. To do this, exclude the `extras_objectchange` table data from the export. The table will still be included in the output file, but will not be populated with any data. + +```no-highlight +pg_dump --exclude-table-data=extras_objectchange netbox > netbox.sql +``` + ## Load an Exported Database !!! warning