untuk membuat automatic backup database posgresql pada linux berikut ini caranya
- saya memakai linux ubuntu
- saya memakai cron sebagai aplikasi penjadwalan pada linux
buat folder mkdir /home/backup rubah hak akses agar user postgres bisa membuat file chown postgres /home/backup buat penjadwalannya dengan cron sudo crontab -e buat backupnya dengan pgdump * * * * * sudo su postgres -c 'pg_dump -Fc -f /home/backup/coba`date +"\%Y-\%m-\%d"`.sql namadatabase'
- file saya simpan disini dan akan membuat file baru sesuai dengan nama file coba tahun bulan tanggal.sql home/backup/coba`date +”\%Y-\%m-\%d”`.sql
- namadatabase adalah database postgresql yang mau di backup
- ***** menandakan jadwal saya buat permenit (bisa anda rubah sendiri ,cari tutorial cron)
referensi :
- http://ithelpblog.com/os/linux/debian/best-way-to-backup-postgresql-database/
- http://wiki.postgresql.org/wiki/Automated_Backup_on_Linux
- https://www.digitalocean.com/community/articles/how-to-backup-postgresql-databases-on-an-ubuntu-vps
- http://www.cyberciti.biz/tips/howto-backup-postgresql-databases.html
- http://stackoverflow.com/questions/1221282/does-anyone-know-of-a-good-way-to-back-up-postgres-databases
- http://technobytz.com/automatic-sql-database-backup-postgres.html
- http://www.hbirddesigns.com/~launch/developer-tools/how-to-automate-postgresql-database-backups-from-linux-shell/
- http://www.hbirddesigns.com/~launch/developer-tools/how-to-automate-postgresql-database-backups-from-linux-shell/
- http://www.mkyong.com/database/backup-restore-database-in-postgresql-pg_dumppg_restore/
- http://wisha.wordpress.com/category/coding-holic/database/
- http://stackoverflow.com/questions/6341321/how-to-check-if-postgresql-backup-was-succesful
- http://openerp.co.id/forum/viewtopic.php?f=2&t=30
- http://www.docstoc.com/docs/123400096/cara-mudah-backup-postgresql
- http://linux3.arinet.org/index.php/linux-admin/124-script-utk-backup-otomatis-database-postgresql
- http://akangirul.wordpress.com/2012/04/16/backup-otomatis-scheduler-postgres-dengan-crontab/
- http://dodo.web.id/2011/05/backup-database-postgresql-secara-terjadwal-menggunakan-cron/
- http://dodo.web.id/2011/05/backup-dan-restore-database-postgresql/
- http://www.hbirddesigns.com/~launch/developer-tools/how-to-automate-postgresql-database-backups-from-linux-shell/
- http://catatan-ts.blogspot.com/2011/06/backup-dan-restore-database-postgresql.html
- http://dev.xbata.com/database/backup-dan-restore-database-postgresql-dengan-pg_dump-dan-pg_restore
- http://dodo.web.id/2012/12/menambahkan-hardisk-baru-untuk-data-direktory-postgresql-di-debian/
- http://ubuntuforums.org/showthread.php?t=1975093
- buku panduan backup admin ppe lpse
- http://unix.stackexchange.com/questions/8584/using-the-system-date-time-in-a-cron-script
semoga berguna 🙂