Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added mediarestore command #178

Merged
merged 7 commits into from Jul 31, 2016
Merged

Added mediarestore command #178

merged 7 commits into from Jul 31, 2016

Conversation

ZuluPro
Copy link
Contributor

@ZuluPro ZuluPro commented Jul 9, 2016

I added a mediarestore command and upgrade all related code:

  • Tar file was made with absolute path from root, so untaring had to be made to root for get files in right place. It didn't allow to restore files in other address. I changed it for include media files in a directory named 'media'.
  • Instead of archive MEDIA_ROOT, the media storage object is used for open files.
  • Files are now read 1 by 1 from storage and write into tar file and reverse, it allows to create (in future) exclusions (PR Exclude some media directories option #45)
  • I also tried to make this process as efficient as possible, so I change mediabackup for use spooled temporary file

@coveralls
Copy link

coveralls commented Jul 9, 2016

Coverage Status

Coverage increased (+0.9%) to 73.279% when pulling 1a91211 on ZuluPro:mediarestore into 94b7848 on django-dbbackup:master.

@ZuluPro ZuluPro self-assigned this Jul 24, 2016
@coveralls
Copy link

coveralls commented Jul 24, 2016

Coverage Status

Coverage increased (+1.7%) to 74.093% when pulling 0c38e72 on ZuluPro:mediarestore into 94b7848 on django-dbbackup:master.

@coveralls
Copy link

coveralls commented Jul 26, 2016

Coverage Status

Coverage increased (+1.7%) to 74.15% when pulling 51e8529 on ZuluPro:mediarestore into b7c63a8 on django-dbbackup:master.

@ZuluPro ZuluPro changed the title [WIP] Added mediarestore command Added mediarestore command Jul 26, 2016
@ZuluPro
Copy link
Contributor Author

ZuluPro commented Jul 26, 2016

I think all is great, @benjaoming @mjs7231 ?

@benjaoming
Copy link
Contributor

Looks good - with tests and everything.

Wondering, all the CommandError: There's no backup file available. outputs in the tests, are they anticipated?It's in themediarestore` functional.sh tests as I read it..

@ZuluPro ZuluPro merged commit c2e150e into jazzband:master Jul 31, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants