.. Reminder for header structure: Parts (H1) : #################### with overline Chapters (H2) : ******************** with overline Sections (H3) : ==================== Subsections (H4) : -------------------- Subsubsections (H5) : ^^^^^^^^^^^^^^^^^^^^ Paragraphs (H6) : """""""""""""""""""" .. meta:: :description: Backing up the WAPT Server :keywords: backup server, WAPT, PostgreSQL, pg_dumpall, FastCopy, WinSCP, documentation .. _backup_server: ########################## Backing up the WAPT Server ########################## To backup your WAPT Server follow this procedure. Regular backups are recommended. .. _linux_backup_server: ***** Linux ***** * Stop WAPT related services on the WAPT Server. .. code-block:: bash systemctl stop wapttasks systemctl stop waptserver systemctl stop nginx * Backup recursively these directories using a backup tool (ex: :program:`rsync`, :program:`WInSCP`, etc..). .. tabs:: .. code-tab:: bash Debian and derivatives /var/www/wapt/ /var/www/wapt-host/ /var/www/waptwua/ /var/www/wads/ /opt/wapt/conf/ /opt/wapt/waptserver/ssl/ .. code-tab:: bash RedHat and derivatives /var/www/html/wapt/ /var/www/html/wapt-host/ /var/www/html/waptwua/ /var/www/html/wads/ /opt/wapt/conf/ /opt/wapt/waptserver/ssl/ .. hint:: If you use Kerberos to authenticate hosts and users, save the :file:`keytab` file too. The :file:`keytab` file is located in the :file:`nginx` folder. * Backup the PostgreSQL database using the :program:`pg_dumpall` utility (adapt filename with your requirements). .. code-block:: bash sudo -u postgres pg_dumpall > /tmp/backup_wapt.sql * Restart WAPT related services on the WAPT Server. .. code-block:: bash systemctl start wapttasks systemctl start waptserver systemctl start nginx .. _windows_backup_server: ******* Windows ******* * Stop WAPT related services on the WAPT Server. .. code-block:: bash net stop wapttasks net stop waptserver net stop waptnginx * Backup the WAPT repository folder on a remote backup destination. .. code-block:: bash C:\wapt\conf C:\wapt\waptserver\repository\wapt C:\wapt\waptserver\repository\wapt-host C:\wapt\waptserver\repository\waptwua C:\wapt\waptserver\repository\wads C:\wapt\waptserver\nginx\ssl * Backup PostgreSQL Database with :program:`pg_dump.exe`. .. code-block:: bash "C:\wapt\waptserver\pgsql-14\bin\pg_dumpall.exe" -U postgres -f C:\backup_wapt.sql * Restart WAPT related services on the WAPT Server. .. code-block:: bash net start wapttasks net start waptserver net start waptnginx