diff --git a/html/admin/backup_restore.html b/html/admin/backup_restore.html index be9e159..6d9f059 100644 --- a/html/admin/backup_restore.html +++ b/html/admin/backup_restore.html @@ -34,11 +34,46 @@
TIMESTAMP=$(date +%Y%m%d-%H%M)
- mysqldump -u "database_username" -p "database_name" | xz -c - > "~/$TIMESTAMP-$DB_NAME.sql.xz"
- (You will be prompted for a password. Type in the password for the MySQL user.)
+ mysqldump -u "database_username" -p "database_name" | xz -c - > "~/$TIMESTAMP-social.sql.xz"
You will be prompted for a password. Type in the password for the MySQL user.
+ + + {HEADING:SECTION:restore_procedure:Restoring from a Backup} -TODO
+If you followed the examples above you might type the following:
+ +cd /var/www/social + +# Stop the daemons +bash ./scripts/stopdaemons.sh + +# Delete and restore the web files +rm -r * +cd .. +tar -Jxf ~/20160130-1200-social-www.tar.xz + +# Recreate the database (using MySQL root account) +mysqladmin -u root -p drop social +mysqladmin -u root -p create social +mysql -u root -p social + + # Inside mysql client + GRANT ALL on social.* TO 'social'@'localhost' IDENTIFIED BY 'the_old_password'; + exit + +# Restore the database as the GNU social MySQL user +xzcat ~/20160130-1200-social.sql.xz | mysql -u social -p social + +# Restart the queue daemons +cd social +bash ./scripts/startdaemons.sh