Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Fix drush commands in cleanup doc #70

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 7 additions & 7 deletions docs/migration_cleanup.md
Original file line number Diff line number Diff line change
Expand Up @@ -76,27 +76,27 @@ Once this is disabled `content_sync`, path aliases, immediate Solr indexing and
OAI-PMH harvesting will be enabled.

```
drush config-split:deactivate migration
drush --user=1 config-split:deactivate migration
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
drush --user=1 config-split:deactivate migration
drush config-split:deactivate migration

```

2. Generate missing path aliases

Enable the `dgi_migrate_regenerate_pathauto_aliases` module and kick off the
generation.
```bash
drush en dgi_migrate_regenerate_pathauto_aliases
drush --user=1 en dgi_migrate_regenerate_pathauto_aliases
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
drush --user=1 en dgi_migrate_regenerate_pathauto_aliases
drush en dgi_migrate_regenerate_pathauto_aliases

drush --uri=$DRUSH_OPTIONS_URI dmrpa:empa --user=1
```

Once it's complete disable the module.
```bash
drush pm:uninstall dgi_migrate_regenerate_pathauto_aliases
drush --user=1 pm:uninstall dgi_migrate_regenerate_pathauto_aliases
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
drush --user=1 pm:uninstall dgi_migrate_regenerate_pathauto_aliases
drush pm:uninstall dgi_migrate_regenerate_pathauto_aliases

```

3. Re-index Solr

```bash
drush --uri=$DRUSH_OPTIONS_URI search-api:index default_solr_index
drush --user=1 --uri=$DRUSH_OPTIONS_URI search-api:index default_solr_index
Copy link
Contributor

@jordandukart jordandukart Jan 27, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
drush --user=1 --uri=$DRUSH_OPTIONS_URI search-api:index default_solr_index
drush --uri=$DRUSH_OPTIONS_URI search-api:index default_solr_index

```
> [!CAUTION]
> The size of the batch sets may need to be reduced depending on the type of
Expand All @@ -105,7 +105,7 @@ drush --uri=$DRUSH_OPTIONS_URI search-api:index default_solr_index

4. Rebuild the OAI-PMH cache
```bash
drush --uri=$DRUSH_OPTIONS_URI idr:roai
drush --user=1 --uri=$DRUSH_OPTIONS_URI idr:roai
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
drush --user=1 --uri=$DRUSH_OPTIONS_URI idr:roai
drush --uri=$DRUSH_OPTIONS_URI idr:roai

This command doesn't support --user. Reasoning here is that OAI entries should only be generated with the anonymous user context given you would not want potentially locked down entries to show as available for harvest.

```

To monitor the progress of the rebuild the queue can be queried to see the
Expand All @@ -119,12 +119,12 @@ The `migration` config_split disables the tracking of content changes.

First rebuild the snapshot table.
```bash
drush --uri=$DRUSH_OPTIONS_URI drush cs:s
drush --user=1 --uri=$DRUSH_OPTIONS_URI cs:s
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
drush --user=1 --uri=$DRUSH_OPTIONS_URI cs:s
drush --uri=$DRUSH_OPTIONS_URI cs:s --user=1

Since --user isn't global needs to be on the end of the command but correct in that it is missing here.

```

Export all the content.
```bash
drush --uri=$DRUSH_OPTIONS_URI content-sync:export --user=1 sync --files=none --entity-types=node
drush --user=1 --uri=$DRUSH_OPTIONS_URI content-sync:export --user=1 sync --files=none --entity-types=node
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
drush --user=1 --uri=$DRUSH_OPTIONS_URI content-sync:export --user=1 sync --files=none --entity-types=node
drush --uri=$DRUSH_OPTIONS_URI content-sync:export --user=1 sync --files=none --entity-types=node

Passed already.

```

[standard-derivative-examiner]: https://github.com/discoverygarden/dgi_standard_derivative_examiner
Loading