Closed (fixed)
Project:
Migrate
Version:
7.x-2.4
Component:
Drush
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
1 Oct 2012 at 16:32 UTC
Updated:
3 Apr 2015 at 22:56 UTC
Jump to comment: Most recent
drush help for migrate-import shows --rollback as an option, but also complains that it isn't one.
$ drush help migrate-import
Perform a given migration
...
Options:
...
--rollback Rollback specified migration(s) if applicable.
...
$ drush migrate-import Test --rollback
Unknown option: --rollback. See `drush help migrate-rollback` for available options. To suppress this error, add the option --strict=0.[error]
$ drush version
drush version 5.7
Comments
Comment #1
mikeryanWell, it's complaining that --rollback isn't an option on migrate-rollback, which is true;). The issue is running a migrate-rollback command (rather than calling the API to run the rollback), and passing the options through. Easily fixed by unsetting the option.
Comment #3
chingis commentedI don't get, drush mi --help display that --rollback is one of the options
Comment #4
osopolarThe drush command is not migrate-rollback, it is migrate-import. See examples in
drush migrate-import --help. I understood the commanddrush migrate-import Article --limit="100 items" --stop --rollbackthe way that it first stops all current Article migrations, roll them back and start migrating 100 items. It's a nice feature for development.If this does not work, it should be removed from the command help.
Drush Version: 6.6-dev
Comment #5
mikeryanPlease do not reopen long-closed issues - if the --rollback option is not working for you, please open a new issue (indicating the Migrate version you're using) describing exactly the command you're executing and the result.
Thanks you.
Comment #6
osopolarWhy not open an already existing issue if it is exactly the problem and it was only fixed because of a misunderstanding (IMHO) - see also comment #4. Please check again the issue. It is not a problem with the rollback command, but with the migrate-import. What else do you need to reproduce the error?
Comment #7
mikeryanThe problem that was reported was receiving the error "Unknown option: --rollback". The --rollback option operates by spawning a migrate-rollback command, and the original problem here was that the --rollback option got passed to the spawned migrate-rollback command, which rightly objected. This problem was fixed, a long time ago, by not passing --rollback to the spawned command. Now, with Migrate 2.7, it works fine for me with migrate_example:
If you're having a problem under Migrate 2.7 with --rollback, it is neither the original problem here, nor is it a universally reproducible problem. Please open a fresh issue, with more detail on the problem you are seeing.