-
Notifications
You must be signed in to change notification settings - Fork 1
/
README
22 lines (15 loc) · 951 Bytes
/
README
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
Django Backup Storage
=====================
This storage backend is heavily inspired by django-queued-storage and allows you specify
a local and a remote storage backend. When uploading to the storage system, it will
store the file to the local storage engine, then transfer the file to the remote system
via a queue for backups. This code is used in production at mixcloud.com with the S3Storage
backend to automagically keep rolling backups of user image uploads.
This backend requires celery, which is used for the queuing.
Installation
------------
1. Make sure celery is installed and running http://ask.github.com/celery/introduction.html
2. Make sure you have a cache backend set up.
3. Add the backend to the storage argument of a FileField
image = ImageField(storage=QueuedBackupStorage(local='django.core.files.storage.FileSystemStorage',
remote='backends.s3boto.S3BotoStorage'), upload_to='uploads')