appsmith icon indicating copy to clipboard operation
appsmith copied to clipboard

backup and restore with diff db names and encryptions

Open pratapaprasanna opened this issue 1 year ago • 12 comments
trafficstars

Fixes: 31004

Summary by CodeRabbit

  • New Features

    • Added support for encryption of backup archives, enhancing data security.
    • Backup and restore utilities now prompt for encryption passwords under certain conditions.
  • Enhancements

    • Improved handling of sensitive data during backup and restore processes.
  • Bug Fixes

    • Adjusted backup and restore scripts to recognize and process encrypted files (.enc).
  • Tests

    • Added tests for new encryption features and backup utilities.
  • Documentation

    • Updated user prompts and instructions to reflect new encryption capabilities.
  • Chores

    • Modified existing scripts to support non-interactive execution for automated processes.

pratapaprasanna avatar Dec 27 '23 17:12 pratapaprasanna

Walkthrough

The update enhances the backup and restore functionalities in Appsmith with encryption capabilities. It introduces user input for encryption during backup and decryption during restoration. Additionally, it improves logging, error handling, and supports environment variable adjustments for secure operations. The changes aim to streamline and secure the process of backing up and restoring Appsmith instances, addressing potential authentication errors during database import and restore.

Changes

Files Change Summary
backup.js, restore.js Added encryption/decryption capabilities, enhanced user input handling, improved logging and cleanup.
utils.js Introduced silent command execution and regex adjustment for encrypted backups, added database name extraction from MongoDB URI.
pre-update.sh Modified backup command to include --non-interactive flag.

Related issues

  • appsmithorg/appsmith#29781: The enhancements in encryption handling and improved error logging could potentially address the authentication error during database import and restore, making it relevant to link to this PR. The changes ensure the correct handling of environment variables, which is a key objective of the issue.

Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media?

Share

Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>.
    • Generate unit-tests for this file.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query. Examples:
    • @coderabbitai generate unit tests for this file.
    • @coderabbitai modularize this function.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai generate interesting stats about this repository and render them as a table.
    • @coderabbitai show all the console.log statements in this repository.
    • @coderabbitai read src/utils.ts and generate unit tests.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.

Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments.

CodeRabbit Commands (invoked as PR comments)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger a review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai help to get help.

Additionally, you can add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.

CodeRabbit Configration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • The JSON schema for the configuration file is available here.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/coderabbit-overrides.v2.json

CodeRabbit Discord Community

Join our Discord Community to get help, request features, and share feedback.

coderabbitai[bot] avatar Dec 27 '23 17:12 coderabbitai[bot]

/build-deploy-preview skip-tests=true

pratapaprasanna avatar Dec 27 '23 17:12 pratapaprasanna

Deploying Your Preview: https://github.com/appsmithorg/appsmith/actions/runs/7340587902. Workflow: On demand build Docker image and deploy preview. skip-tests: true. env: ``. PR: 29902. recreate: .

github-actions[bot] avatar Dec 27 '23 17:12 github-actions[bot]

Deploy-Preview-URL: https://ce-29902.dp.appsmith.com

github-actions[bot] avatar Dec 27 '23 17:12 github-actions[bot]

This PR has not seen activitiy for a while. It will be closed in 7 days unless further activity is detected.

github-actions[bot] avatar Jan 04 '24 16:01 github-actions[bot]

/build-deploy-preview skip-tests=true

pratapaprasanna avatar Jan 10 '24 11:01 pratapaprasanna

Deploying Your Preview: https://github.com/appsmithorg/appsmith/actions/runs/7473958190. Workflow: On demand build Docker image and deploy preview. skip-tests: true. env: ``. PR: 29902. recreate: .

github-actions[bot] avatar Jan 10 '24 11:01 github-actions[bot]

Deploy-Preview-URL: https://ce-29902.dp.appsmith.com

github-actions[bot] avatar Jan 10 '24 11:01 github-actions[bot]

This PR has not seen activitiy for a while. It will be closed in 7 days unless further activity is detected.

github-actions[bot] avatar Jan 26 '24 16:01 github-actions[bot]

/build-deploy-preview skip-tests=true

pratapaprasanna avatar Feb 06 '24 10:02 pratapaprasanna

Deploying Your Preview: https://github.com/appsmithorg/appsmith/actions/runs/7798410868. Workflow: On demand build Docker image and deploy preview. skip-tests: true. env: ``. PR: 29902. recreate: .

github-actions[bot] avatar Feb 06 '24 10:02 github-actions[bot]

Deploy-Preview-URL: https://ce-29902.dp.appsmith.com

github-actions[bot] avatar Feb 06 '24 10:02 github-actions[bot]

This PR has not seen activitiy for a while. It will be closed in 7 days unless further activity is detected.

github-actions[bot] avatar Mar 06 '24 16:03 github-actions[bot]

/build-deploy-preview skip-tests=true

sharat87 avatar Mar 08 '24 11:03 sharat87

Deploying Your Preview: https://github.com/appsmithorg/appsmith/actions/runs/8202818796. Workflow: On demand build Docker image and deploy preview. skip-tests: true. env: ``. PR: 29902. recreate: .

github-actions[bot] avatar Mar 08 '24 11:03 github-actions[bot]

Deploy-Preview-URL: https://ce-29902.dp.appsmith.com

github-actions[bot] avatar Mar 08 '24 11:03 github-actions[bot]

/build-deploy-preview skip-tests=true

sharat87 avatar Mar 17 '24 10:03 sharat87

Deploying Your Preview: https://github.com/appsmithorg/appsmith/actions/runs/8314737992. Workflow: On demand build Docker image and deploy preview. skip-tests: true. env: ``. PR: 29902. recreate: .

github-actions[bot] avatar Mar 17 '24 10:03 github-actions[bot]

Deploy-Preview-URL: https://ce-29902.dp.appsmith.com

github-actions[bot] avatar Mar 17 '24 10:03 github-actions[bot]

/build-deploy-preview skip-tests=true

pratapaprasanna avatar Mar 20 '24 09:03 pratapaprasanna

Deploying Your Preview: https://github.com/appsmithorg/appsmith/actions/runs/8356593980. Workflow: On demand build Docker image and deploy preview. skip-tests: true. env: ``. PR: 29902. recreate: .

github-actions[bot] avatar Mar 20 '24 09:03 github-actions[bot]

Deploy-Preview-URL: https://ce-29902.dp.appsmith.com

github-actions[bot] avatar Mar 20 '24 09:03 github-actions[bot]

/build-deploy-preview skip-tests=true

sharat87 avatar Mar 25 '24 05:03 sharat87

Deploying Your Preview: https://github.com/appsmithorg/appsmith/actions/runs/8415372989. Workflow: On demand build Docker image and deploy preview. skip-tests: true. env: ``. PR: 29902. recreate: .

github-actions[bot] avatar Mar 25 '24 05:03 github-actions[bot]

Deploy-Preview-URL: https://ce-29902.dp.appsmith.com

github-actions[bot] avatar Mar 25 '24 05:03 github-actions[bot]

/build-deploy-preview skip-tests=true

sharat87 avatar Mar 27 '24 12:03 sharat87

Deploying Your Preview: https://github.com/appsmithorg/appsmith/actions/runs/8451533595. Workflow: On demand build Docker image and deploy preview. skip-tests: true. env: ``. PR: 29902. recreate: .

github-actions[bot] avatar Mar 27 '24 12:03 github-actions[bot]

Deploy-Preview-URL: https://ce-29902.dp.appsmith.com

github-actions[bot] avatar Mar 27 '24 12:03 github-actions[bot]