|
@@ -4,19 +4,27 @@
|
|
|
|
|
|
echo 'Backing up jovian platform ...'
|
|
|
|
|
|
-# Backup gogs
|
|
|
+# Backup all postgres just in case
|
|
|
+echo 'Backing up PostgreSQL ...'
|
|
|
+sudo -u postgres pg_dumpall > dumpfile
|
|
|
+echo 'PostgreSQL done.'
|
|
|
+
|
|
|
+echo 'Backing up 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*
|
|
|
+echo 'GOGS done.'
|
|
|
|
|
|
-# Backup postgres dbs
|
|
|
+echo 'Backing up KANBOARD ...'
|
|
|
sudo -u postgres pg_dump kanboard_db > kanboard_dumpfile
|
|
|
-sudo -u postgres pg_dump wiki_db > wiki_dumpfile
|
|
|
+echo 'KANBOARD done.'
|
|
|
|
|
|
-# Backup all postgres just in case
|
|
|
-sudo -u postgres pg_dumpall > dumpfile
|
|
|
+echo 'Backing up WIKI ...'
|
|
|
+echo '> wiki db ...'
|
|
|
+sudo -u postgres pg_dump wiki_db > wiki_dumpfile
|
|
|
|
|
|
-# Backup wiki
|
|
|
+echo '> wiki files ...'
|
|
|
tar cvhf /home/jovian/Local/Backup/Wiki/mediawiki.tar /var/www/mediawiki
|
|
|
+echo 'WIKI done.'
|
|
|
|
|
|
-echo 'End'
|
|
|
+echo 'Platform saved.'
|