Skip to main content

A simple backup command for Django

Project description

This is a fork of the django-backup app

Supports MySQL, PostgreSQL, and SQLite databases.

This app backs up database and the media directory on the local disk in a plain directory, without subdirectories.

It does not set a goal of syncing files offsite. To sync the files or do other post-processing, please use a signal backup_ready or an independent script.

To list and download the backup files via the web, try application django-directory

Installation

Add to the INSTALLED_APPS entry ‘simple_backup’,.

Settings

SIMPLE_BACKUP_DIRECTORY - directory where the backups will be stored. Default value is ‘backups’, relative to the current working directory. This setting can be over-ridden with the option –output-directory (or shorter version -o)

SIMPLE_BACKUP_DAYS - number of days to keep the backup files. Default value is None. If set, older files will be deleted automatically each time the new backup is made. This walue can be over-ridden with a –days option to the command.

SIMPLE_BACKUP_EXCLUDE_TABLE_DATA - the tables listed in this setting will be backed up without the data.

Default value is []. This setting does not work with SQLite databases.

Commands

backup - backs up the site. See output of python manage.py backup –help for more information.

Signals

The command backup sends a signal simple_backups.signals.backup_ready when the backup is prepared and copied to the backups directory.

Changes

2.3 (2024-07-22)

  • Adds option SIMPLE_BACKUP_EXCLUDE_TABLE_DATA to exclude data from selected tables.

2.2 (2023-10-29)

  • Version increment, no new functionalities.

2.1 (2023-10-29)

  • Supports Django 4

2.0 (2023-05-13)

  • Ported to Python3

  • Supports Django > 2

1.1 (2023-05-13)

  • Pins Python support to < 3

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-simple-backup-2.3.tar.gz (5.5 kB view details)

Uploaded Source

File details

Details for the file django-simple-backup-2.3.tar.gz.

File metadata

  • Download URL: django-simple-backup-2.3.tar.gz
  • Upload date:
  • Size: 5.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.11.4

File hashes

Hashes for django-simple-backup-2.3.tar.gz
Algorithm Hash digest
SHA256 dca973eab88cf64376bb1af5f24ec6273814058423f61cb954366dfcfe7942fa
MD5 e6318113897f153f4b0d8ffdbf993608
BLAKE2b-256 74d50e034d1aa5de3d46a9d64c9cd102f89d0233a261a89f7c99e03865f94783

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