Opened 3 years ago

Closed 3 years ago

#20979 closed New feature (wontfix)

Serialize payload of model.FileField when using manage.py dumpdata

Reported by: Jacob Rief Owned by: nobody
Component: File uploads/storage Version: master
Severity: Normal Keywords:
Cc: Triage Stage: Unreviewed
Has patch: no Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: no UI/UX: no

Description

I added a useful feature to django-filer, which allows to dump the payload of files together with their meta-data, when running
manage.py dumpdata > dumpfile.json
a dumpfile which later is reimported using
manage.py loaddata dumpfile.json
then also restores the payload of the file on disk, not just the meta-data. This simplifies backups and migrations of projects, since an administrator does not require additional tools such as zip or tar. It also makes backups less error prone, since everything is contained in one single file. In my opinion, such a feature would also be useful for models.FileField and models.ImageField.

If this feature is considered useful enough, I would be pleased to implement it into the Django's main code.

More details here: https://github.com/jrief/django-filer/blob/serialize-payload/docs/dump_payload.rst and here: https://github.com/stefanfoulis/django-filer/pull/335

Change History (1)

comment:1 Changed 3 years ago by Tim Graham

Needs documentation: unset
Needs tests: unset
Patch needs improvement: unset
Resolution: wontfix
Status: newclosed

Thanks for the suggestion. I don't think we should be promoting fixtures as a backup strategy though. Having this in a 3rd party package seems like a good fit though.

Note: See TracTickets for help on using tickets.
Back to Top