Skip to content

Commit 05c6b0f

Browse files
authored
Merge pull request #352 from django-dbbackup/google-storage
Add documentation for django-storage
2 parents 2fa127c + 890ab72 commit 05c6b0f

File tree

1 file changed

+22
-0
lines changed

1 file changed

+22
-0
lines changed

docs/storage.rst

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -64,6 +64,28 @@ See `FileSystemStorage's documentation`_ for a full list of available settings.
6464
.. _`FileSystemStorage's documentation`:
6565
https://docs.djangoproject.com/en/stable/ref/files/storage/#the-filesystemstorage-class
6666

67+
Google cloud storage
68+
--------------------
69+
Our backend for Google cloud storage uses django-storages.
70+
71+
Setup
72+
~~~~~
73+
74+
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. ::
75+
76+
pip install django-storages[google]
77+
78+
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`_ ::
79+
80+
DBBACKUP_STORAGE = 'storages.backends.gcloud.GoogleCloudStorage'
81+
DBBACKUP_STORAGE_OPTIONS = {
82+
"bucket_name": "your_bucket_name",
83+
"project_id": "your_project_id",
84+
"blob_chunk_size": 1024 * 1024
85+
}
86+
87+
.. _`django-storages`: https://django-storages.readthedocs.io/en/latest/backends/gcloud.html
88+
6789
Amazon S3
6890
---------
6991

0 commit comments

Comments
 (0)