Skip to content

Instantly share code, notes, and snippets.

@abass
Last active January 31, 2017 19:42
Show Gist options
  • Save abass/95facd4dfd84853edf9ca6b85d8e9e28 to your computer and use it in GitHub Desktop.
Save abass/95facd4dfd84853edf9ca6b85d8e9e28 to your computer and use it in GitHub Desktop.
Use this to backup your site (preferably OctoberCMS or some file-based site) on a nightly basis via Git to your GitHub account. Problems reside with GitLab or BitBucket as last I checked, they do not allow "git push" to reside on the server, they specifically limit that for security reasons. This shell script must reside in the root of the websi…
#!/bin/sh
git checkout production && git add -A && git commit -m "Automatic Backup @ `date`" && git push
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment