Skip to content
New issue

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

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

Already on GitHub? Sign in to your account

fix docs guides backup-script #9275

Open
wants to merge 8 commits into
base: main
Choose a base branch
from

Conversation

xiagw
Copy link
Contributor

@xiagw xiagw commented May 6, 2024

Description

fix docs guides backup-script

don't repeat script

Fixes # (issue)

How Has This Been Tested?

  • Test A
  • Test B

Screenshots (if appropriate):

Checklist:

  • I have performed a self-review of my own code
  • I have made corresponding changes to the documentation if applicable

@JW-CH JW-CH added the documentation Improvements or additions to documentation label May 6, 2024
Copy link
Contributor

@mmomjian mmomjian left a comment

Choose a reason for hiding this comment

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

Thank you for your contribution! My personal opinion is that we should keep the initialization logic out of the daily script like it was before, as this is more likely to conceal errors than help prevent them.

docs/docs/guides/template-backup-script.md Outdated Show resolved Hide resolved
docs/docs/guides/template-backup-script.md Outdated Show resolved Hide resolved
docs/docs/guides/template-backup-script.md Outdated Show resolved Hide resolved
docs/docs/guides/template-backup-script.md Outdated Show resolved Hide resolved
Copy link
Contributor

@mmomjian mmomjian left a comment

Choose a reason for hiding this comment

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

This is a lot more robust, thank you.

@thariq-shanavas
Copy link
Contributor

Thank you for improving the script!

if [ "$1" = init ]; then
    if _init_setup; then
        echo "init setup OK."
    else
        echo "init setup Fail, exit 1"
        exit 1
    fi
fi

Can you mention that the first time this script is run, it should be run as backup.sh init?
Or preferably, keep the section for initializing the repositories separate?

Copy link
Contributor

@zackpollard zackpollard left a comment

Choose a reason for hiding this comment

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

Thanks for making the changes to the script to include a helper section, looks good to me now except I got a syntax error that I commented on above. Also looks like the formatter checks are failing.

docs/docs/guides/template-backup-script.md Outdated Show resolved Hide resolved
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants