Restoring

Linux

In case of a complete crash, restart a standard WAPT Server installation on a Linux server.

  • stop WAPT related services on the server;

systemctl stop nginx
systemctl stop waptserver
systemctl stop wapttasks
  • restore the following directories:

/var/www/wapt/
/var/www/wapt-host/
/var/www/waptwua/
/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_20180301.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 /opt/wapt/conf/
chown -R wapt /opt/wapt/waptserver/ssl/
  • scan package repositories;

wapt-scanpackages /var/www/wapt/
  • restart WAPT related services on the server;

systemctl start wapttasks
systemctl start waptserver
systemctl start nginx

Windows

  • restore the following directories C:\wapt\waptserver\repository and C:\wapt\waptserver\conf and C:\wapt\waptserver\nginx\ssl;

  • apply the total right 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