Skip to content

ItinerisLtd/trellis-backup-during-deploy

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

31 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

trellis-backup-during-deploy

GitHub tag license

Backup WordPress database during Trellis deploys.

Requirements

  • Trellis 9dfddfd or later
  • Ansible v2.4 or later

Installation

Add this role to galaxy.yml:

# galaxy.yml
- name: trellis-backup-during-deploy
  src: https://github.com/ItinerisLtd/trellis-backup-during-deploy
  version: 0.1.2 # Check for latest version!

Add this role to the deploy_initialize_after hook:

# group_vars/all/deploy-hooks.yml
# Learn more on https://roots.io/trellis/docs/deploys/#hooks
deploy_initialize_after:
  - "{{ playbook_dir }}/vendor/roles/trellis-backup-during-deploy/tasks/main.yml"

Usage

Deploy as usual. No special action needed.

$ wp db export is invoked during deploy. You can find the database dump in /srv/www/example.com/releases/2018XXXXXXXXXX/example_com_env-2018-XX-XX-XXXXXXX.sql – be sure to check the pre-latest release-folder (e.g. the release before deploy) since current serves as alias to the latest release.

Author Information

trellis-backup-during-deploy is a Itineris Limited project created by Tang Rufus.

Special thanks to the Roots team whose Trellis make this project possible.

Full list of contributors can be found here.

Feedback

Please provide feedback! We want to make this library useful in as many projects as possible. Please submit an issue and point out what you do and don't like, or fork the project and make suggestions. No issue is too small.

Change log

Please see CHANGELOG for more information on what has changed recently.

License

trellis-backup-during-deploy is released under the MIT License.