Hi,

This error came after doing the following:

1. on site1.com created a backup with backup and migrate module of database1 to amazon s3 using AES encryption and password on file.
(everything works and the backup is saved with AES encryption to S3 location as gzip file)

2. on site2.com, restore (with backup and migrate module) the same backup file (database1 AES encrypted file from s3) to a new database using the same password.
then comes this error:
PDOException: SQLSTATE[HY093]: Invalid parameter number: mixed named and positional parameters in function backup_migrate_source_db_mysql->_restore_db_from_file() (line 199 in file /opt/apps/drupal/htdocs/sites/all/modules/backup_migrate/includes/sources.db.mysql.inc).

So if my Backup and migrate files are AES encrypted (With AES encrypt -module) there seems to be no way to restore it from a different website? So in case of my site1 is down and gone, it is not possible to restore its AES encrypted database backup using some other sites backup and migrate module and same password?

When not using any compression for the backup file, it throws this when restoring from another site:
PDOException: SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'h5?u????DI???5[<??.M??]?+L9U;ySQL Dump SET SQL_MODE="NO_AUTO_VALUE_ON_ZERO"' at line 1 function backup_migrate_source_db_mysql->_restore_db_from_file() (line 199 in file /opt/apps/drupal/htdocs/sites/all/modules/backup_migrate/includes/sources.db.mysql.inc).

When the AES is disable, restoring a database file from another site works.

Modules used:
Backup and migrate 7.x-3.1
AES encrypt 7.x-1.10
where AES implementation uses Mcrypt and Cipher 256 Rinjdael

Comments

jukka792 created an issue. See original summary.

couturier’s picture

Status: Active » Closed (works as designed)

It's been about 1 1/2 years since you reported the issue with no intermediate follow-up, so I am assuming you are happy with the work-around solution you found. If not, please upgrade to the latest 7.x-3.2 version and try again.