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

Add task for pulling down remote db without loading locally #94

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

efatsi
Copy link

@efatsi efatsi commented Sep 7, 2016

This is an awesome tool, thanks for the work on it so far.

I often just need to create a backup without loading the database onto my local environment though. A nice thing to have automatically run in front of deploys in case things go poorly.

backup_dir = instance.fetch(:db_backup_dir)

instance.logger.info("Unzipping database backup and storing in #{backup_dir}")
system("bunzip2 -f #{file} && mkdir -p #{backup_dir} && mv #{unzip_file} #{backup_dir}")
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You should use compressor.decompress(file) like here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants