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 backup task to :up:db #151

Merged
merged 1 commit into from
Jan 11, 2016
Merged

Add backup task to :up:db #151

merged 1 commit into from
Jan 11, 2016

Conversation

EvanK
Copy link
Contributor

@EvanK EvanK commented Jan 7, 2016

Currently, from what I can tell, running genesis:up (or genesis:up:db) overrides the staging/prod db without generating a backup: https://github.com/genesis/wordpress/blob/master/deployment/lib/sync.rb#L123-L138

Right now, we've got a "missing posts" issue with nursing.org staging. I haven't been able to to pin it down to any :up commands being run, but it does seem like a useful thing to create a backup of the staging db before overriding it with local. Two ways we could do that:

  1. Create it on the server in /#{deploy-branch}/backups/ (something already created a few .sql files there for nursing, but I'm not sure what) - we'll want to figure out how to keep just a few to prevent server bloat with sql dumps.
  2. Create it locally on the dev's machine (using the existing :backup task w/no modification)

Thoughts?

@EvanK EvanK added the bug label Dec 21, 2015
Note: the sleep(1) ensures no naming conflict between the remote db dump we now create and the local db dump subsequently sent to and loaded on the remote server
@EvanK
Copy link
Contributor

EvanK commented Jan 7, 2016

This should generate a locally stored backup of the remote server's database before syncing the local db up to the remote. I've tested this on a genesis site, but I'd welcome anyone else to doublecheck :D

EvanK added a commit that referenced this pull request Jan 11, 2016
@EvanK EvanK merged commit f525fb2 into master Jan 11, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant