*/1 * * * * /usr/bin/mysqldump -u root --opt asteriskcdrdb > /var/www/html/cdr_db/asteriskcdrdb.sql
*/2 * * * * /usr/bin/sshpass -p "PASSWORD" /usr/bin/scp -P 22 /root/asteriskcdrdb.sql root@18.16.136.15:~
Running this on cron will backup the database and then will move the file to a remote server
frist cron run every 1 minute the other very 2 sec
No hay comentarios:
Publicar un comentario