Uncomment lines rather than repeating script
This commit is contained in:
parent
2aa1260e3c
commit
3398bc20cd
|
@ -4622,34 +4622,7 @@ Make sure that the database gets backed up. By using cron if anything goes wron
|
||||||
editor /etc/cron.daily/backup
|
editor /etc/cron.daily/backup
|
||||||
#+END_SRC
|
#+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:
|
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
|
|
||||||
#!/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.
|
|
||||||
|
|
||||||
#+BEGIN_SRC: bash
|
#+BEGIN_SRC: bash
|
||||||
chmod 600 /etc/cron.daily/backup
|
chmod 600 /etc/cron.daily/backup
|
||||||
|
|
Loading…
Reference in New Issue