Skip to main content

Django package for backing up databases.

Project description

Django backups

A django backup package for backing up your databases.

Installation

NOTE: Before installing this package, you should have postgresql installed on your machine.

Install through pip

pip install django-backups

In settings.py, add the following line:

BACKUP_DIR = BASE_DIR / "backups_folder"

This is where your saved backups will go locally.

Add backups to INSTALLED_APPS.

INSTALLED_APPS = [
    ...

    'backups',
]

Add those two lines in settings.py:

from dotenv import load_dotenv
load_dotenv()

Add the following lines to .env file:

DO_SPACE_ACCESS_KEY_ID='<key_id>'
DO_SPACE_SECRET_ACCESS_KEY='<secret_access_key>'
DO_SPACE_ENDPOINT_URL='<endpoint_url>'
DO_SPACE_BUCKET_NAME='<bucked_name>'
DO_SPACE_REGION='<s3_region>'

NOTE: Don't worry about DO_SPACE, it'll work with S3 in general.

Before running the server, make sure to do python manage.py migrate

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

django_backups-0.0.1.tar.gz (7.9 kB view details)

Uploaded Source

Built Distribution

django_backups-0.0.1-py3-none-any.whl (9.6 kB view details)

Uploaded Python 3

File details

Details for the file django_backups-0.0.1.tar.gz.

File metadata

  • Download URL: django_backups-0.0.1.tar.gz
  • Upload date:
  • Size: 7.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.11.2

File hashes

Hashes for django_backups-0.0.1.tar.gz
Algorithm Hash digest
SHA256 0c212675948f7bc178c17dc09eea9267e5a9e2ac7712483c2539d44608406bf6
MD5 e4690bf1b31bf319ea902f8afe038e89
BLAKE2b-256 b679fb193bf8a8e88994733301d8837eeba0672c4968e2f38cb6e09d82097888

See more details on using hashes here.

File details

Details for the file django_backups-0.0.1-py3-none-any.whl.

File metadata

File hashes

Hashes for django_backups-0.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 876f1e42bcc8451913ee1dcb81f8fa2b919ff6d87d0af55505b51008740ca307
MD5 0b2495b605360e95431768dc4508e4e6
BLAKE2b-256 cfb57937e9fa851c3c3c512261821a8410df49fa44b3f52d194c2351d7617cf4

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page