docs: add guide for structures pruning script - #1496
Conversation
The structures pruning script is little known, but rather useful. Add a guide for running this, along with reasons why you might want to. Private-ref: https://tasks.opencraft.com/browse/BB-11072
|
Thanks for the pull request, @samuelallan72! This repository is currently maintained by Once you've gone through the following steps feel free to tag them in a comment and let them know that your changes are ready for engineering review. 🔘 Get product approvalIf you haven't already, check this list to see if your contribution needs to go through the product review process.
🔘 Provide contextTo help your reviewers and other members of the community understand the purpose and larger context of your changes, feel free to add as much of the following information to the PR description as you can:
🔘 Get a green buildIf one or more checks are failing, continue working on your changes until this is no longer the case and your build turns green. DetailsWhere can I find more information?If you'd like to get more details on all aspects of the review process for open source pull requests (OSPRs), check out the following resources: When can I expect my changes to be merged?Our goal is to get community contributions seen and reviewed as efficiently as possible. However, the amount of time that it takes to review and merge a PR can vary significantly based on factors such as:
💡 As a result it may take up to several weeks or months to complete a review and merge your PR. |
The structures pruning script is little known, but rather useful. Update its readme with some quick information, and a link to more detailed information on the official docs site. Also convert the readme to markdown, so we can use the Github alerts markdown extension: https://docs.github.com/en/get-started/writing-on-github/getting-started-with-writing-and-formatting-on-github/basic-writing-and-formatting-syntax#alerts . Depends-on: openedx/docs.openedx.org#1496 Private-ref: https://tasks.opencraft.com/browse/BB-11072
The structures pruning script is little known, but rather useful. Update its readme with some quick information, and a link to more detailed information on the official docs site. Also convert the readme to markdown, so we can use the Github alerts markdown extension: https://docs.github.com/en/get-started/writing-on-github/getting-started-with-writing-and-formatting-on-github/basic-writing-and-formatting-syntax#alerts . Depends-on: openedx/docs.openedx.org#1496 Private-ref: https://tasks.opencraft.com/browse/BB-11072
The structures pruning script is little known, but rather useful. Update its readme with some quick information, and a link to more detailed information on the official docs site. Also convert the readme to markdown, so we can use the Github alerts markdown extension: https://docs.github.com/en/get-started/writing-on-github/getting-started-with-writing-and-formatting-on-github/basic-writing-and-formatting-syntax#alerts . Depends-on: openedx/docs.openedx.org#1496 Private-ref: https://tasks.opencraft.com/browse/BB-11072
There was a problem hiding this comment.
@samuelallan72 Minor changes requested here. I'd love to also see @jfavellar90 take a look as well.
| --dumpDbUsersAndRoles --gzip "$CONNECTION_STRING" | ||
|
|
||
| It's also probably worth doing this through a maintenance window to avoid disruption. | ||
| Also consider recommending avoiding using Studio during this time to avoid lost work if the database needs restoring from this backup. |
There was a problem hiding this comment.
| Also consider recommending avoiding using Studio during this time to avoid lost work if the database needs restoring from this backup. | |
| If possible, avoid using Studio during this time to prevent lost work in case you need to restore the database from this backup. |
|
|
||
| use DATABASE_NAME | ||
|
|
||
| db.runCommand({compact: "modulestore.structures", force: true}) |
There was a problem hiding this comment.
@samuelallan72 I remember you saying that there was a reason to use force here. We should document that reason since it's naturally going to give the reader pause.
|
|
||
| Some important notes: | ||
|
|
||
| - ``--retain`` specifies how many old revisions to retain in addition to the current and original. Consider using ``0`` to clean up as much as possible, or set this to a small number (eg. ``2``) if there is a chance that recent revisions may be required. |
There was a problem hiding this comment.
| - ``--retain`` specifies how many old revisions to retain in addition to the current and original. Consider using ``0`` to clean up as much as possible, or set this to a small number (eg. ``2``) if there is a chance that recent revisions may be required. | |
| - ``--retain`` specifies how many old revisions to retain in addition to the current and original. Consider using ``0`` to clean up as much as possible, or set this to a small number (eg. ``2``) if there is a chance that recent revisions may be required. Note that there is no UI for restoring these revisions, and you are taking a backup, so in most cases, no revisions should need to be retained. |
Description
The structures pruning script is little known, but rather useful. Add a guide for running this, along with reasons why you might want to.
Supporting information
Private-ref: https://tasks.opencraft.com/browse/BB-11072
Testing instructions