Backup tutorials: Unterschied zwischen den Versionen
Zur Navigation springen
Zur Suche springen
(Die Seite wurde neu angelegt: „== Apache == Zurück zu Backups erstellen“) |
|||
(Eine dazwischenliegende Version desselben Benutzers wird nicht angezeigt) | |||
Zeile 1: | Zeile 1: | ||
== Apache == | == Apache == | ||
<pre> | |||
cd /etc/apache2/sites-available/ | |||
sudo nano tutorials.conf | |||
</pre> | |||
<pre> | |||
<VirtualHost *:80> | |||
ServerName tutorials.kirner.or.at | |||
ServerAlias tutorials.kirner.or.at | |||
Redirect / https://tutorials.kirner.or.at | |||
</VirtualHost> | |||
</pre> | |||
<pre> | |||
sudo nano tutorials-ssl.conf | |||
</pre> | |||
<pre> | |||
<VirtualHost *:443> | |||
ServerName tutorials.kirner.or.at | |||
SSLEngine on | |||
SSLCertificateFile /etc/ssl/certs/tutorials.crt | |||
SSLCertificateKeyFile /etc/ssl/private/apache.key | |||
# Pfad zu den Webinhalten | |||
DocumentRoot /var/www/tutorials | |||
ErrorLog ${APACHE_LOG_DIR}/tutorials.kirner.or.at-error.log | |||
CustomLog ${APACHE_LOG_DIR}/tutorials.kirner.or.at-access.log combined | |||
</VirtualHost> | |||
</pre> | |||
<pre> | |||
sudo cp -R --preserve=mode,timestamps /var/www/tutorials/ /media/cloud_backup/tutorials/ | |||
</pre> | |||
<pre> | |||
sudo mysqldump -u root -p<password> tutorials > /media/cloud_backup/tutorials/tutorials_last.sql | |||
</pre> | |||
<pre> | |||
mysql -u root -p[<password>] tutorials < /media/cloud_backup/tutorials/tutorials_last.sql | |||
</pre> | |||
Zurück zu [[Backups erstellen]] | Zurück zu [[Backups erstellen]] |
Aktuelle Version vom 4. September 2016, 10:59 Uhr
Apache
cd /etc/apache2/sites-available/ sudo nano tutorials.conf
<VirtualHost *:80> ServerName tutorials.kirner.or.at ServerAlias tutorials.kirner.or.at Redirect / https://tutorials.kirner.or.at </VirtualHost>
sudo nano tutorials-ssl.conf
<VirtualHost *:443> ServerName tutorials.kirner.or.at SSLEngine on SSLCertificateFile /etc/ssl/certs/tutorials.crt SSLCertificateKeyFile /etc/ssl/private/apache.key # Pfad zu den Webinhalten DocumentRoot /var/www/tutorials ErrorLog ${APACHE_LOG_DIR}/tutorials.kirner.or.at-error.log CustomLog ${APACHE_LOG_DIR}/tutorials.kirner.or.at-access.log combined </VirtualHost>
sudo cp -R --preserve=mode,timestamps /var/www/tutorials/ /media/cloud_backup/tutorials/
sudo mysqldump -u root -p<password> tutorials > /media/cloud_backup/tutorials/tutorials_last.sql
mysql -u root -p[<password>] tutorials < /media/cloud_backup/tutorials/tutorials_last.sql
Zurück zu Backups erstellen