boa icon indicating copy to clipboard operation
boa copied to clipboard

Using drush sql-sync for site redundancy

Open petrowsky opened this issue 6 years ago • 2 comments

Ok, so I've got two different boa VMs in the same facility.

I've got a crontab running rsync to copy a custom platform and respective public and private files to a backup (failover) server. I'm running the script as the o1 user and it all works except for the db import.

Running... drush -yd sql-sync @source @target (-d being debug)

Reveals the error... ERROR 1045 (28000): Access denied for user 'user'@'localhost' (using password: YES) Where user is the expected user from the drush alias.

Which looking at the permissions in the mysql table, shows that 'user' accounts don't have the permissions to import a database. What is the suggested method for running a hot swap backup like this? Am I able to run drush sql-sync as the o1 db user since it has permissions to drop the tables and import the sync sql?

I'm just wandering around the code now trying to see how aegir handles this when doing something like a site copy.

Should I be doing this as some user other than o1? You can't do it as root as it can't use drush and I doubt o1.ftp is appropriate.

petrowsky avatar Jul 09 '18 16:07 petrowsky