Difference between revisions of "Cedeus DB backups"
From stgo
(→dump of the GeoNode DB - on CedeusDB) |
m (→notifications) |
||
Line 7: | Line 7: | ||
To get notified about the backups via email, a/the shell script may send emails via "mailx" - i.e Nail. | To get notified about the backups via email, a/the shell script may send emails via "mailx" - i.e Nail. | ||
=> see http://klenwell.com/press/2009/03/ubuntu-email-with-nail/ | => see http://klenwell.com/press/2009/03/ubuntu-email-with-nail/ | ||
+ | |||
+ | Btw. postfix may work as well | ||
=> '''ToDo''': Install mail program | => '''ToDo''': Install mail program |
Revision as of 18:26, 2 December 2014
>> return to Cedeus_IDE
Contents
How to set up Backups
notifications
To get notified about the backups via email, a/the shell script may send emails via "mailx" - i.e Nail. => see http://klenwell.com/press/2009/03/ubuntu-email-with-nail/
Btw. postfix may work as well
=> ToDo: Install mail program
dump of the GeoNode DB - on CedeusDB
- create a shell script that contains the pgdump instructions - see /home/ssteinig/pgdbbackup.sh on CedeusDB
- test if script or script execution actually works. A simple script for testing may perhaps be this (/home/ssteinig/touchy.sh)
-
#!/bin/bash touch /home/ssteinig/ftw.text
- create a cron-tab entry for user ssteinig with "
crontab -e
"- then add entry such as "
00 01 * * * sh /home/ssteinig/pgdbbackup.sh
" to run the script daily at 1:00 am - => when using the user "postgres" to do the db dump
- check if postgres user has a password assigned already (use ALTER... to do so: http://wiki.geosteiniger.cl/mediawiki-1.22.7/index.php/Setting_up_geonode#Some_PostgreSQL_commands )
- create a .pgpass file to provide the password: http://wiki.postgresql.org/wiki/Pgpass
- then add entry such as "
- check also if the cron is running: "
sudo service cron status
" otherwise start it... - to see what the cron tab contains use "
crontab -l
"
=> ToDo: check how to open an ftp connection and place the file there... or retrieve it using "wget"?