Question

I always make backup using "backup and migrate" module. But now, need to automate this process using scripts.

When execute backup using "backup and migrate" this module generate .mysql file with approximately 3.3 MB(compacted) and 9MB(uncompacted) , but using the following script command, file have 17MB(compacted) and 53MB+(uncompacted) and .sql extension.

mysqldump -u user_mysql -pMY_PASS  --databases my_database | gzip > /home/my_user/my_docs/database.sql.gz

How generate ".mysql" extension file using "mysqldump"?

Was it helpful?

Solution

My hosting is a non dedicated version, so, I don't install drush. But I found a good solution. In config BAM (/admin/config/system/backup_migrate) have an tab "Schedules". In this option u can add backup schedule. Excellent solution, because winscp script (my script backup hosting) will get .mysql.gz generated in BAM private folder automatically. Additionally, about file size backup, BAM really exclude some data tables. This option is personalizable in "/admin/config/system/backup_migrate/profile/list/edit/default", "DEFAULT DATABASE BACKUP OPTIONS" option "Exclude the data from the following tables".

Licensed under: CC-BY-SA with attribution
Not affiliated with drupal.stackexchange
scroll top