How to back up server services.
CREATE ROLE backup WITH
NOSUPERUSER
NOCREATEDB
NOCREATEROLE
PASSWORD 'tropcool'
LOGIN
;
Add in the file pg_hba.conf
:
local all backup trust
Reload with SELECT pg_reload_conf();
.
With postgres : GRANT SELECT ON ALL TABLES IN SCHEMA public TO backup;
Connect with sudo -u postgres psql --username=backup --host localhost --dbname=kanboard_db
pg_dump kanboard_db --username=backup --host=localhost > dumpfile.test
Does not work because backup can't access sequences.
Through SSH on server
sudo a2dissite \
kanboard.jovian-hersemeule.eu kanboard.jovian-hersemeule.eu-le-ssl \
wiki.jovian-hersemeule.eu wiki.jovian-hersemeule.eu-le-ssl \
gogs.jovian-hersemeule.eu gogs.jovian-hersemeule.eu-le-ssl ;
sudo systemctl reload apache2 ;
Through SSH on server
cd /home/jovian/GitWork/DricomDragon/JovianLinux/Server/Scripts/Backup/ ;
git pull ;
./j7backalllocal
On local machine
cd /home/jovian/GitWork/DricomDragon/JovianLinux/Server/Scripts/Backup/ ;
git pull ;
./j7backretrieve
Through SSH on server
sudo a2ensite \
kanboard.jovian-hersemeule.eu kanboard.jovian-hersemeule.eu-le-ssl \
wiki.jovian-hersemeule.eu wiki.jovian-hersemeule.eu-le-ssl \
gogs.jovian-hersemeule.eu gogs.jovian-hersemeule.eu-le-ssl ;
sudo systemctl reload apache2 ;
Use Jenkins.