Digital ID
Latest

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/

Docspell Backup

📆
🏷
, , ,

purpose and application

When you want to backup docspell.

definitions

None.

steps

  1. Become docspell user
  2. Backup database pg_dump -W postgres://docspell@127.0.0.1:5432/docspell | gzip > backup/docsell_$(date +%Y%m%dT%H%M%S).psql.gz
  3. Backup joex config cp docspell-joex-0.41.0/conf/docspell-joex.conf backup/
  4. Backup rest server config cp docspell-restserver-0.41.0/conf/docspell-server.conf backup/

Resources

None.

Gotosocial Backup

📆
🏷
, , ,

purpose and application

Backing up gotosocial.

definitions

None.

steps

  1. Backup db pg_dump -W postgres://gotosocial@127.0.0.1:5432/gotosocial | gzip > /var/tmp/gotosocial_$(date +%Y%m%dT%H%M%S).psql.gz
  2. Backup media files gotosocial admin media list-attachments --config-path /etc/gotosocial.yaml --log-level fatal | xargs tar -cvzf /var/tmp/gotosocial-media_$(date +%Y%m%dT%H%M%S).tar.gz

Resources

Keycloak Backup

📆
🏷
, , ,

purpose and application

Use this procedure when you want to backup keycloak.

definitions

None.

steps

  1. stop keycloak rcctl stop keycloak
  2. become keycloak user su -s /bin/ksh -l _keycloak
  3. change into keycloak basedir cd keycloak
  4. export realms bash bin/kc.sh export --file ../backup/keycloak-$(date +%Y%m%dT%H%M%S)

Resources

https://www.keycloak.org/server/importExport