From 0f2fadcede83806ba810e86633ae9f055a4eaed2 Mon Sep 17 00:00:00 2001 From: Oliver Gorwits Date: Fri, 8 Aug 2014 21:13:13 +0100 Subject: [PATCH] Add docs note about database backups --- Netdisco/Changes | 1 + Netdisco/lib/App/Netdisco/Manual/Deployment.pod | 13 +++++++++++++ 2 files changed, 14 insertions(+) diff --git a/Netdisco/Changes b/Netdisco/Changes index 121e6e41..a673ee06 100644 --- a/Netdisco/Changes +++ b/Netdisco/Changes @@ -17,6 +17,7 @@ * Process tree updated to show daemon worker status/activity * Handle management IP of one device being in use on another device * Log at debug the vlan reindexing in macsuck + * Add docs note about database backups [BUG FIXES] diff --git a/Netdisco/lib/App/Netdisco/Manual/Deployment.pod b/Netdisco/lib/App/Netdisco/Manual/Deployment.pod index d65fd743..e6906029 100644 --- a/Netdisco/lib/App/Netdisco/Manual/Deployment.pod +++ b/Netdisco/lib/App/Netdisco/Manual/Deployment.pod @@ -164,6 +164,19 @@ Then run the web daemon with the environment variable to enable the feature: DANCER_DEBUG=1 ~/bin/netdisco-web restart +=head2 Database Backups + +We recommend you backup the Netdisco database regularly. You could put the +following commands into a shell script and call it nightly from C: + + DATE=`date +%Y%m%d` + /usr/bin/pg_dump -F p --create -f /path/to/backups/netdisco-pgsql-$DATE.dump netdisco + gzip -9f /path/to/backups/netdisco-pgsql-$DATE.dump + /usr/bin/find /path/to/backups/ -type f -ctime +30 -exec rm {} \; + +This will keep 30 days of backups. You don't need to stop Netdisco during the +backup. + =head1 Further Reading... Other ways to run and host the web application can be found in the