12345678910111213141516171819 |
- #!/bin/sh
- # Script to backup jovian web platform locally
- echo 'Backing up jovian platform ...'
- # Backup gogs
- sudo -u gituser /home/gituser/gogs/gogs backup --target /home/gituser/
- sudo mv /home/gituser/gogs-backup-2* /home/jovian/Local/Backup/Gogs/
- sudo chown jovian:jovian /home/jovian/Local/Backup/Gogs/gogs-backup-2*
- # Backup postgres dbs
- sudo -u postgres pg_dump kanboard_db > kanboard_dumpfile
- sudo -u postgres pg_dump wiki_db > wiki_dumpfile
- # Backup all postgres just in case
- sudo -u postgres pg_dumpall > dumpfile
- echo 'End'
|