Uncomment lines rather than repeating script

This commit is contained in:
Bob Mottram 2014-08-02 12:17:30 +01:00
parent 2aa1260e3c
commit 3398bc20cd
1 changed files with 1 additions and 28 deletions

View File

@ -4622,34 +4622,7 @@ Make sure that the database gets backed up. By using cron if anything goes wron
editor /etc/cron.daily/backup
#+END_SRC
If you already have a backup script created for Friendica then just uncomment the lines for Red Matrix. The backup script should look something like the following:
#+BEGIN_SRC: bash
#!/bin/sh
# stop the web server to avoid any changes to the databases during backup
service apache2 stop
MYSQL_PASSWORD=elNYCk3hKE5jCjifUUL6ymP7
umask 0077
# Backup the database
mysqldump --password=$MYSQL_PASSWORD friendica > /var/backups/friendica_daily.sql
# Make the backup readable only by root
chmod 600 /var/backups/friendica_daily.sql
# Backup the database
mysqldump --password=$MYSQL_PASSWORD redmatrix > /var/backups/redmatrix_daily.sql
# Make the backup readable only by root
chmod 600 /var/backups/redmatrix_daily.sql
# restart the web server
service apache2 start
#+END_SRC
Save and exit.
Uncomment the lines for Red Matrix, then save and exit. If you didn't install Friendica earlier then see the backup section within the Friendica install instructions.
#+BEGIN_SRC: bash
chmod 600 /etc/cron.daily/backup