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

  1. Become netbox user su -s /bin/ksh -l _netbox
  2. Backup the database pg_dump -W postgres://netbox@127.0.0.1:5432/netbox | gzip > backup/netbox_$(date +%Y-%m-%d).psql.gz
  3. Backup media tar -czf backup/netbox-media_$(date +%Y-%m-%d).tar.gz netbox/netbox/media/
  4. Backup netbox configuration cp netbox/netbox/netbox/configuration.py backup/
  5. Backup gunicorn configuration cp netbox/gunicorn.py backup/

Resources

https://netboxlabs.com/docs/netbox/en/stable/administration/replicating-netbox/

--EOF