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

Conversation

bondjimbond
Copy link
Contributor

Adds --user=1 to the drush commands, and removes an extra drush from one of the commands.

```

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.

@@ -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.

@@ -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.

```

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

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

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

```

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

@@ -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

```

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.

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants