Skip to content

Instantly share code, notes, and snippets.

@joeworkman
Created November 30, 2015 16:01
Show Gist options
  • Save joeworkman/b2698b0a1a54e9ac5d02 to your computer and use it in GitHub Desktop.
Save joeworkman/b2698b0a1a54e9ac5d02 to your computer and use it in GitHub Desktop.
You can schedule the following shell script as a cron job on your hosting company in order to replace the cmd-data directory on your server with a "golden" master copy that you have saved to a new location. You will obviously want to change the directory locations where the files live to fit your server.
#!/bin/bash
rm -r /websites/cms.joeworkman.net/cms-data/
cp -r /home/joeworkman/cms-data-template /websites/cms.joeworkman.net/cms-data/
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment