Skip to content

Commit d77d25f

Browse files
authored
4.3.0 (#558)
1 parent f5bf468 commit d77d25f

File tree

5 files changed

+11
-161
lines changed

5 files changed

+11
-161
lines changed

.github/workflows/release.yml

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -42,9 +42,6 @@ jobs:
4242

4343
# Until we are transfered out of Jazzband, the workaround is releasing manually via personal PyPI accounts.
4444
# The following steps are required to release a new version of the package:
45-
# python -m pip install -U pip
46-
# python -m pip install -U -r requirements/build.txt
47-
# python -m pip install -U -r requirements.txt
48-
# python -m build --sdist --wheel --outdir dist .
49-
# twine check dist/*
45+
# python -m pip install -U pip && pip install -U -r requirements/build.txt && pip install -U -r requirements.txt
46+
# python -m build --sdist --wheel --outdir dist . && twine check dist/*
5047
# twine upload dist/*

README.rst

Lines changed: 1 addition & 154 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@ It is made to:
2626
- Deal easily with remote archiving
2727
- Keep your development database up to date
2828
- Use Crontab or Celery to setup automated backups
29+
- Manually backup and restore via Django management commands
2930

3031
Docs
3132
====
@@ -42,160 +43,6 @@ restore mechanisms, apply compression and/or encryption and use the storage syst
4243
It gives a simple interface to backup and restore your database or media
4344
files.
4445

45-
Management Commands
46-
===================
47-
48-
dbbackup
49-
--------
50-
51-
Backup your database to the specified storage. By default this will backup all
52-
databases specified in your settings.py file and will not delete any old
53-
backups. You can optionally specify a server name to be included in the backup
54-
filename.
55-
56-
::
57-
58-
Usage: ./manage.py dbbackup [options]
59-
60-
Options:
61-
--noinput Tells Django to NOT prompt the user for input of any
62-
kind.
63-
-q, --quiet Tells Django to NOT output other text than errors.
64-
-c, --clean Clean up old backup files
65-
-d DATABASE, --database=DATABASE
66-
Database to backup (default: everything)
67-
-s SERVERNAME, --servername=SERVERNAME
68-
Specify server name to include in backup filename
69-
-z, --compress Compress the backup files
70-
-e, --encrypt Encrypt the backup files
71-
-o OUTPUT_FILENAME, --output-filename=OUTPUT_FILENAME
72-
Specify filename on storage
73-
-O OUTPUT_PATH, --output-path=OUTPUT_PATH
74-
Specify where to store on local filesystem
75-
-x EXCLUDE_TABLES, --exclude-tables=EXCLUDE_TABLES
76-
Exclude tables data from backup (-x 'public.table1, public.table2')
77-
78-
dbrestore
79-
---------
80-
81-
Restore your database from the specified storage. By default this will lookup
82-
the latest backup and restore from that. You may optionally specify a
83-
servername if you you want to backup a database image that was created from a
84-
different server. You may also specify an explicit local file to backup from.
85-
86-
::
87-
88-
Usage: ./manage.py dbrestore [options]
89-
90-
Options:
91-
--noinput Tells Django to NOT prompt the user for input of any
92-
kind.
93-
-d DATABASE, --database=DATABASE
94-
Database to restore
95-
-i INPUT_FILENAME, --input-filename=INPUT_FILENAME
96-
Specify filename to backup from
97-
-I INPUT_PATH, --input-path=INPUT_PATH
98-
Specify path on local filesystem to backup from
99-
-s SERVERNAME, --servername=SERVERNAME
100-
Use a different servername backup
101-
-c, --decrypt Decrypt data before restoring
102-
-p PASSPHRASE, --passphrase=PASSPHRASE
103-
Passphrase for decrypt file
104-
-z, --uncompress Uncompress gzip data before restoring
105-
-n SCHEMA, --schema SCHEMA
106-
Specify schema(s) to restore. Can be used multiple times.
107-
-r, --no-drop Don't clean (drop) the database. This only works with mongodb and postgresql.
108-
--pg-options PG_OPTIONS
109-
Additional pg_restore options, e.g. '--if-exists --no-owner'. Use quotes.
110-
111-
mediabackup
112-
-----------
113-
114-
Backup media files by get them one by one, include in a TAR file. ::
115-
116-
Usage: ./manage.py mediabackup [options]
117-
118-
Options:
119-
--noinput Tells Django to NOT prompt the user for input of any
120-
kind.
121-
-q, --quiet Tells Django to NOT output other text than errors.
122-
-c, --clean Clean up old backup files
123-
-s SERVERNAME, --servername=SERVERNAME
124-
Specify server name to include in backup filename
125-
-z, --compress Compress the archive
126-
-e, --encrypt Encrypt the backup files
127-
-o OUTPUT_FILENAME, --output-filename=OUTPUT_FILENAME
128-
Specify filename on storage
129-
-O OUTPUT_PATH, --output-path=OUTPUT_PATH
130-
Specify where to store on local filesystem
131-
132-
mediarestore
133-
------------
134-
135-
Restore media files from storage backup to your media storage. ::
136-
137-
Usage: ./manage.py mediarestore [options]
138-
139-
Options:
140-
--noinput Tells Django to NOT prompt the user for input of any
141-
kind.
142-
-q, --quiet Tells Django to NOT output other text than errors.
143-
-i INPUT_FILENAME, --input-filename=INPUT_FILENAME
144-
Specify filename to backup from
145-
-I INPUT_PATH, --input-path=INPUT_PATH
146-
Specify path on local filesystem to backup from
147-
-e, --decrypt Decrypt data before restoring
148-
-p PASSPHRASE, --passphrase=PASSPHRASE
149-
Passphrase for decrypt file
150-
-z, --uncompress Uncompress gzip data before restoring
151-
-r, --replace Replace existing files
152-
153-
Tests
154-
=====
155-
156-
Tests are stored in `dbbackup.tests` and to run them you must launch:
157-
158-
::
159-
160-
python runtests.py
161-
162-
In fact, ``runtests.py`` acts as a ``manage.py`` file and all Django commands
163-
are available. So you could launch:
164-
165-
::
166-
167-
python runtests.py shell
168-
169-
to get a Python shell configured with the test project. Also all test
170-
command options are available and usable to run only a selection of tests.
171-
See `Django test command documentation`_ for more information about it.
172-
173-
.. _`Django test command documentation`: https://docs.djangoproject.com/en/stable/topics/testing/overview/#running-tests
174-
175-
There are even functional tests: ::
176-
177-
./functional.sh
178-
179-
See documentation for details.
180-
181-
To run the tests across all supported versions of Django and Python, you
182-
can use Tox. Firstly install Tox:
183-
184-
::
185-
186-
pip install tox
187-
188-
To run the tests just use the command ``tox`` in the command line. If you
189-
want to run the tests against just one specific test environment you can run
190-
``tox -e <testenv>``. For example, to run the tests with Python3.9 and
191-
Django3.2 you would run:
192-
193-
::
194-
195-
tox -e py39-django32
196-
197-
The available test environments can be found in ``tox.ini``.
198-
19946
Contributing
20047
============
20148

dbbackup/VERSION

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
4.2.1
1+
4.3.0

docs/changelog.rst

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,11 @@ Changelog
44
Unreleased
55
----------
66

7+
* Nothing (yet)!
8+
9+
4.3.0 (2025-05-09)
10+
----------
11+
712
* Add generic `--pg-options` to pass custom options to postgres.
813
* Add option `--if-exists` for pg_dump command
914
* Empty string as HOST for postgres unix domain socket connection is now supported.

setup.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,10 +43,11 @@ def get_test_requirements():
4343
"amazon",
4444
"s3",
4545
"dropbox",
46+
"sqlite",
4647
],
4748
packages=find_packages(),
4849
classifiers=[
49-
"Development Status :: 4 - Beta",
50+
"Development Status :: 5 - Production/Stable",
5051
"Environment :: Web Environment",
5152
"Environment :: Console",
5253
"Framework :: Django :: 3.2",

0 commit comments

Comments
 (0)