Commit ae2928a1 authored by Michiel de Jong's avatar Michiel de Jong

commit backups but don't push anywhere

parent 89ad0970
......@@ -5,5 +5,5 @@ This image pulls in a database dump and a www-content folder from a git repo, an
````
sudo docker build -t indiehosters/lamp-git .
sudo docker run -d -e DATA_REPO=git@123.123.123.123:test.dev -e SECONDARY_REPO=git@124.124.124.124:test.dev -v /home/user/.ssh:/root/.ssh indiehosters/lamp-git
sudo docker run -d -v $(pwd)/data:/data indiehosters/lamp-git
````
0 * * * * root cd /data; mysqldump --all-databases > dump.sql; git add *; git commit -am"backup `date`"; git push -u origin master; git push -u secondary master
42 * * * * root cd /data; mysqldump --all-databases > dump.sql; git add *; git commit -am"backup `date`"
#!/bin/bash
git config --global user.email "backup@IndieHosters"
git config --global user.name "IndieHosters backup"
exec mysqld_safe &
exec cron &
git clone $DATA_REPO /data
cd /data
git remote add secondary $SECONDARY_REPO
git config --local user.email "backup@IndieHosters"
git config --local user.name "IndieHosters backup"
git config --global push.default simple
sleep 5
mysql < /data/dump.sql
source /etc/apache2/envvars
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment