Netbox Backup
purpose and application
Use this for backing up your netbox instance. This is specific to my setup YMMV.
definitions
- YMMV - Your Mileage May Vary
steps
- Become netbox user
su -s /bin/ksh -l _netbox
- Backup the database
pg_dump -W postgres://netbox@127.0.0.1:5432/netbox | gzip > backup/netbox_$(date +%Y-%m-%d).psql.gz
- Backup media
tar -czf backup/netbox-media_$(date +%Y-%m-%d).tar.gz netbox/netbox/media/
- Backup netbox configuration
cp netbox/netbox/netbox/configuration.py backup/
- Backup gunicorn configuration
cp netbox/gunicorn.py backup/
Resources
https://netboxlabs.com/docs/netbox/en/stable/administration/replicating-netbox/
--EOF