Documentos de Académico
Documentos de Profesional
Documentos de Cultura
Copia Base Datos Manual Postgressql
Copia Base Datos Manual Postgressql
Usando postgresql
Ejecutar el siguiente comando: pg_dump nombre_basedatos -Fp -U usuario_Ubuntu -h localhost -p 5432 > /home/openerp/nombredel_archivobackup #password contrasea del usuario de Ubuntu Ejemplo: pg_dump test1 -Fp -U openerp -h localhost -p 5432 > /home/openerp/dbbackup #password test1234
sudo vi /etc/fstab Paste: UUID=5609af05-1cc8-4130-bf35-2d53e1eb7bb6 /backup ext4 defaults 0 0 #add this line at the end of the file df #this should give /dev/sdc1 /backup touch /backup/test #If its correct this file will be written to your HD It is better to do automatic backup locally and write the backups manually to your external harddisk and keep this harddisk in a save place. Create a backup directory cd /var/backups sudo mkdir openerp Create a crontab with a backup schedule sudo crontab -e paste: 0 3 * * * su postgres -c /usr/bin/pg_dump -U postgres test3 | gzip -c > /var/backups/openerp/dbbackup-$( date +\%d\%m-\%Y_\%H:\%M ).gz ; echo Database backup: $(date) >> /var/backups/openerp/dbbackup.log 0 4 * * 6 find /var/backups/openerp -xdev -ctime +30 -type f -exec rm \{\} \; sudo vi /var/log/syslog #See the cronjob logs
recurso: http://www.nedworkstut.com/?p=97