SITEGEIST.MAGICWAND THE DAILY PAIN OF A FLOW-DEV » Cloning Servers » Testing Migrations » Switching between branches with migrations SOLUTION: CREATE FLOW COMMANDS FOR THAT
SITEGEIST.MAGICWAND ./FLOW CLONE - PROCEDURE 1. Read local configuration → Flow configuration-manager 2. Fetch remote configuration → ssh and remote configuration:show 3. Check Configuration → verify mysql on both ends 4. Drop and Recreate local DB 5. Transfer Database → ssh "msqldump" | mysql 6. Transfer Files → rsync Data/Persistent 7. Clear Caches 8. Migrate cloned DB 9. Publish Resources 10.Execute post_clone commands → add user / build elastic index etc.
SITEGEIST.MAGICWAND ./FLOW CLONE - USAGE # show all available presets ./flow clone:list # clone from remote host with the information stored in the master preset ./flow clone:preset master # clone remote host with the information stored in the master preset ./flow clone:remotehost --host=host --user=user --port=port -- path=path --context=context
SITEGEIST.MAGICWAND ./FLOW CLONE - USAGE # Create a backup of the entire database and the directory `Data/ Persistent` ("stash entry") under the given name ./flow stash:create --name=name # Lists all named stash entries ./flow stash:list # Restores a stash entry ./flow stash:restore --name=name # Removes all stash entries ./flow stash:clear
SITEGEIST.MAGICWAND INSTALLATION composer require --dev sitegeist/magicwand ATTENTION: This is a dev-tool. You don't want to have code that drops your db on production!!!
SITEGEIST.MAGICWAND CONTRIBUTION » https://github.com/sitegeist/Sitegeist.MagicWand » Pull Requests are welcome! » Support PostgreSQL » Support more ssh/rsync options » NO WINDOWS SUPPORT IS PLANNED!!!