About Not Saving Session Data in Database Backups
Use the --exclude-table-data
parameter to exclude session data from Django PostgreSQL database backups:
$ pg_dump --username=website_username --format=p \
--exclude-table-data=django_session \
--file=latest.backup website_dbname
Tips and Tricks Dev Ops Databases Django 4.2 Django 3.2 Django 2.2 PostgreSQL
Also by me
Django Paddle Subscriptions app
For Django-based SaaS projects.
Django GDPR Cookie Consent app
For Django websites that use cookies.