j7backalllocal 539 B

12345678910111213141516171819
  1. #!/bin/sh
  2. # Script to backup jovian web platform locally
  3. echo 'Backing up jovian platform ...'
  4. # Backup gogs
  5. sudo -u gituser /home/gituser/gogs/gogs backup --target /home/gituser/
  6. sudo mv /home/gituser/gogs-backup-2* /home/jovian/Local/Backup/Gogs/
  7. sudo chown jovian:jovian /home/jovian/Local/Backup/Gogs/gogs-backup-2*
  8. # Backup postgres dbs
  9. sudo -u postgres pg_dump kanboard_db > kanboard_dumpfile
  10. sudo -u postgres pg_dump wiki_db > wiki_dumpfile
  11. # Backup all postgres just in case
  12. sudo -u postgres pg_dumpall > dumpfile
  13. echo 'End'