Handling backups with Trellis

I agree this is an issue that is critical to the long term adoption rate of Trellis and possibly Bedrock.

Before Trellis, I found perfect peace with Revisr. Which backs up my entire site and database to my Git repository, incrementally. You can even specify a separate branch, which you can later manually prune so your repo doesn’t get oversized.

Revisr is not compatible, however, with Trellis because the local files structure differs. This means that when Revisr asks me what folders to include, it gets confused because the development path to the uploads folder, for example, differs from the production path.

I’m actively working on solving this issue (possibly going to submit a patch to Revisr that allows you to configure different paths for different locations) and will definitely post a solution here if I arrive at one. But I wanted to share this in case someone has settled on a solution since and would like to share.

@MWDelaney, I saw your solution (great work!) but the reason I am not adopting it currently is because:

  1. If Git contains a backup of the site already, why create yet another server to backup too later?
  2. Seems like restoring the database and uploads directory would be a manual process?

Also, I am using (for the first time today) Mergebot to sync my Production and Development databases. But it’s not a backup solution, strictly merging.