Difference between revisions of "Backup of geonode"

From stgo
Jump to: navigation, search
(Created page with '>> return to Cedeus IDE ---- Backup procedure taken from: http://docs.geonode.org/en/latest/deploy/backup.html GeoNode Server (with GeoNode 2.0c8): # Backup Geonode users D…')
 
Line 4: Line 4:
 
Backup procedure taken from: http://docs.geonode.org/en/latest/deploy/backup.html
 
Backup procedure taken from: http://docs.geonode.org/en/latest/deploy/backup.html
  
GeoNode Server (with GeoNode 2.0c8):
+
== Backup GeoNode Server (with GeoNode 2.0c8): ==
 
# Backup Geonode users DB (psql needs to be running)
 
# Backup Geonode users DB (psql needs to be running)
 
#* <code>sudo -u postgres -i pg_dump -c -Fc geonode > /home/ssteinig/geonodedb.backup</code>
 
#* <code>sudo -u postgres -i pg_dump -c -Fc geonode > /home/ssteinig/geonodedb.backup</code>
Line 22: Line 22:
 
# re-start the previously stopped services: Apache2, Tomcat7, PSQL
 
# re-start the previously stopped services: Apache2, Tomcat7, PSQL
  
DB Server:
+
== Backup DB ==
 +
ToDo
 +
 
 +
== Restore GeoNode Server ==
 +
copied text:
 +
# stop all services: apache2, tomcat7, psql
 +
# restore GeoNode config and GeoServer
 +
#* sudo tar -C / -xvzf /home/ssteinig/geonodeConfigBackup.tgz
 +
#* sudo tar -C / -xvzf /home/ssteinig/geonodeDataBackup.tgz
 +
# restore the template and design files
 +
#* fill in... with tar -C / -xyzf /myBackupFiles
 +
# Restore the GeoNode database
 +
#* <code>sudo /etc/init.d/postgresql start</code> (or: <code>sudo /etc/init.d/postgresql-8.4 start</code>)
 +
#* <code>sudo -u postgres -i "psql -c 'drop database geonode;'"</code>
 +
#* <code>sudo -u postgres -i "psql -c 'create database geonode;'"</code>
 +
#* <code>sudo -u postgres -s "pg_restore -Fc -d geonode /home/ssteinig/geonodedb.backup"</code>
 +
# start services: apache2, tomcat7
 +
 
 +
== Restore DB ==
 +
ToDo

Revision as of 13:43, 6 February 2014

>> return to Cedeus IDE


Backup procedure taken from: http://docs.geonode.org/en/latest/deploy/backup.html

Backup GeoNode Server (with GeoNode 2.0c8):

  1. Backup Geonode users DB (psql needs to be running)
    • sudo -u postgres -i pg_dump -c -Fc geonode > /home/ssteinig/geonodedb.backup
  2. Stop services
    • sudo service apache2 stop
    • sudo service tomcat7 stop
    • sudo postgresql-8.4 stop o: sudo service postgresql stop (I am actually running PSQL 9.1.11 on cedeusgis1)
  3. Backup Geonode config & GeoServer data directory:
    • sudo tar -cvzf /home/ssteinig/geonodeConfigBackup.tgz /etc/geonode
    • sudo tar -cvzf /home/ssteinig/geonodeDataBackup.tgz /var/lib/geoserver/geonode-data/
  4. In addition, any templates, design changes, and/or CSS files will also need to be captured.
    • e.g. my modified css and logo have been in /etc/geonode/media/geonode/img/ ... so they should be backed-up within the config tgz file.
    • but my text modifications to the start pages (i18n strings) are in a different location (...perhaps I should save the whole package?)
      • sudo tar -cvzf /home/ssteinig/geonodei18nBackup.tgz /usr/local/lib/python2.7/dist-packages/geonode/locale/
    • just to be save I may also do a backup of the GeoNode web folder where I have the CSS:
      • sudo tar -cvzf /home/ssteinig/geonodeWWWBackup.tgz /var/www/geonode/
  5. re-start the previously stopped services: Apache2, Tomcat7, PSQL

Backup DB

ToDo

Restore GeoNode Server

copied text:

  1. stop all services: apache2, tomcat7, psql
  2. restore GeoNode config and GeoServer
    • sudo tar -C / -xvzf /home/ssteinig/geonodeConfigBackup.tgz
    • sudo tar -C / -xvzf /home/ssteinig/geonodeDataBackup.tgz
  3. restore the template and design files
    • fill in... with tar -C / -xyzf /myBackupFiles
  4. Restore the GeoNode database
    • sudo /etc/init.d/postgresql start (or: sudo /etc/init.d/postgresql-8.4 start)
    • sudo -u postgres -i "psql -c 'drop database geonode;'"
    • sudo -u postgres -i "psql -c 'create database geonode;'"
    • sudo -u postgres -s "pg_restore -Fc -d geonode /home/ssteinig/geonodedb.backup"
  5. start services: apache2, tomcat7

Restore DB

ToDo