In D7 and D8 I've grown used to using "drush sql-sync @alias.remote @alias.local" to sync the database.
In my limited experiments, I'm not seeing support for sql-sync for drush?
#1) Is there a drush command for BackdropCMS to sync the database?
#2) If not, how are other folks doing this? Backup and Migrate, manually with mysqldump, other....?
Comments
In terms of ability to use "sql-sync" with drush and backdrop, I've been told
I've also been reminded that if I were to use Lando (as I have so often been told) I could use Lando tools to update the database. I will probably move over to Lando completely very soon.
sql-sync is broken due to https://github.com/backdrop-contrib/drush/issues/114
But drush site alias is now working, so if you create a local and a remote alias, you can use these steps :
1. Dump remote database: drush @backdrop.remote sql-dump > /path/to/remote.sql
2. Clear local database: drush @backdrop.local sql-drop
3. Import remote database into local: drush @backdrop.local sql-cli < /path/to/remote.sql
Real life example on my boilerdrop script: https://github.com/opi/boilerdrop/blob/master/scripts/update_local_from_... ; Note that drush site-alias file has to be in a 'drush' subfolder of your document root. Here is an example: https://github.com/opi/boilerdrop/blob/master/scripts/templates/project....
Is there any chance that Bee will be supporting something like aliases or database syncing?
https://backdropcms.org/project/bee
Maybe this does it?
https://github.com/backdrop-contrib/bee/issues/129
I'll need to do some testing.
@stpaultim
Peter decided not to do sql-sync in that as it would need more work. I think he was probably referring to aliases (https://github.com/backdrop-contrib/bee/issues/131) as aliases would be required for the function as described to work.
We had a discussion about this at Backdrop Live and the notes are on that ticket.
I use db-import and db-export in bee using a script with git to do syncing. This works well, however, we also have a work in progress to add the db-drop command (https://github.com/backdrop-contrib/bee/issues/202).
Perhaps once aliases are done, we could revisit the suggestion to include sql-sync.