Restoring the WAPT Server¶
In case of a complete crash, restart a standard WAPT Server installation on your WAPT Server. Then follow this procedure to restore your data.
Linux¶
Stop WAPT related services on the WAPT Server.
systemctl stop nginx
systemctl stop waptserver
systemctl stop wapttasks
Restore the following directories.
/var/www/wapt/
/var/www/wapt-host/
/var/www/waptwua/
/var/www/wads/
/opt/wapt/conf/
/opt/wapt/waptserver/ssl/
/var/www/html/wapt/
/var/www/html/wapt-host/
/var/www/html/waptwua/
/var/www/html/wads/
/opt/wapt/conf/
/opt/wapt/waptserver/ssl/
Restore the database (adapt the name of your file). The first command deletes the WAPT database (if it exists). Make sure that your dump file is correct before deleting!
sudo -u postgres psql -c "drop database wapt"
sudo -u postgres psql < /tmp/backup_wapt.sql
Apply ownership rights to the restored folders.
chown -R wapt:www-data /var/www/wapt/
chown -R wapt:www-data /var/www/wapt-host/
chown -R wapt:www-data /var/www/waptwua/
chown -R wapt:www-data /var/www/wads/
chown -R wapt /opt/wapt/conf/
chown -R wapt /opt/wapt/waptserver/ssl/
chown -R wapt:www-data /var/www/html/wapt/
chown -R wapt:www-data /var/www/html/wapt-host/
chown -R wapt:www-data /var/www/html/waptwua/
chown -R wapt:www-data /var/www/html/wads/
chown -R wapt /opt/wapt/conf/
chown -R wapt /opt/wapt/waptserver/ssl/
Run a Scanpackages on your repositories.
wapt-scanpackages /var/www/wapt/
wapt-scanpackages /var/www/html/wapt/
Restart WAPT related services on the WAPT Server.
systemctl start wapttasks
systemctl start waptserver
systemctl start nginx
Windows¶
Stop WAPT related services on the WAPT Server.
net start wapttasks
net start waptserver
net start waptnginx
Restore the following directories.
C:\wapt\waptserver\repository\wapt
C:\wapt\waptserver\repository\wapt-host
C:\wapt\waptserver\repository\waptwua
C:\wapt\waptserver\repository\wads
C:\wapt\waptserver\conf
C:\wapt\waptserver\nginx\ssl
Apply full rights to the folder
C:\wapt\waptserver\repository
for the “Network Service” group.Restore PostgreSQL Database with pg_restore.exe.
"C:\wapt\waptserver\pgsql-9.6\bin\psql.exe" -f c:\backup_wapt.sql -U postgres
Scan package repositories.
wapt-scanpackages "C:\wapt\waptserver\repository\wapt"
Restart WAPT related services on the WAPT Server.
net start wapttasks
net start waptserver
net start waptnginx