Skip to content

Commit

Permalink
Merge pull request #352 from django-dbbackup/google-storage
Browse files Browse the repository at this point in the history
Add documentation for django-storage
  • Loading branch information
jonathan-s authored Sep 26, 2020
2 parents 2fa127c + 890ab72 commit 05c6b0f
Showing 1 changed file with 22 additions and 0 deletions.
22 changes: 22 additions & 0 deletions docs/storage.rst
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,28 @@ See `FileSystemStorage's documentation`_ for a full list of available settings.
.. _`FileSystemStorage's documentation`:
https://docs.djangoproject.com/en/stable/ref/files/storage/#the-filesystemstorage-class

Google cloud storage
--------------------
Our backend for Google cloud storage uses django-storages.

Setup
~~~~~

In order to backup to Google cloud storage, you'll first need to create an account at google. Once that is complete, you can follow the required setup below. ::

pip install django-storages[google]

Add the following to your project's settings. Strictly speaking only `bucket_name` is required, but we'd recommend to add the other two as well. You can also find more settings in the readme for `django-storages`_ ::

DBBACKUP_STORAGE = 'storages.backends.gcloud.GoogleCloudStorage'
DBBACKUP_STORAGE_OPTIONS = {
"bucket_name": "your_bucket_name",
"project_id": "your_project_id",
"blob_chunk_size": 1024 * 1024
}

.. _`django-storages`: https://django-storages.readthedocs.io/en/latest/backends/gcloud.html

Amazon S3
---------

Expand Down

0 comments on commit 05c6b0f

Please sign in to comment.