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

Add a webpage that walks through the new backup and restore examples for a local Vitess environment. #1861

Open
wants to merge 4 commits into
base: prod
Choose a base branch
from

Conversation

shailpujan88
Copy link
Collaborator

This PR is For Add new getting started example #1798.

This pull request adds documentation for managing backups and restorations in a local Vitess environment.
Key Changes:

  • Included detailed instructions for setting up a backup schedule.
  • Added guidelines for restoring data from backups.

Copy link

netlify bot commented Oct 11, 2024

Deploy Preview for vitess ready!

Name Link
🔨 Latest commit 2822e8e
🔍 Latest deploy log https://app.netlify.com/sites/vitess/deploys/670d42e1ec850400086e1332
😎 Deploy Preview https://deploy-preview-1861--vitess.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

@shailpujan88 shailpujan88 marked this pull request as ready for review October 11, 2024 13:29
that the [MoveTables](../../../migration/move-tables/) and [Resharding](../../../configuration-advanced/resharding) user guides have been followed (which take you through
steps `101` to `306`).

This guide is useful only if you are using Vitess in a local environment.
Copy link
Member

Choose a reason for hiding this comment

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

The steps defined here could theoretically be almost replicated on K8S as we are only using vtctldclient commands. We should mention that this guide is intended for the local getting started guide, but similar steps can be done on a K8S deployment.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Done

Copy link
Member

Choose a reason for hiding this comment

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

I am not seeing this change

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

I just now push now you can see the changes.

Comment on lines 32 to 33
Expected Output
When you run the script, the following output can be expected:
Copy link
Member

Choose a reason for hiding this comment

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

Something is wrong with the format of Expected Output, both lines 32 and 33 are rendered on the same line.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

removed line 32

Copy link
Member

Choose a reason for hiding this comment

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

I am not seeing it removed

Comment on lines 76 to 80
For example, navigating to the directory:
```bash
cd /path/to/local/backup/directory
ls -l
```
Copy link
Member

Choose a reason for hiding this comment

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

We should put the full path directly here, so the user can copy-paste. We already know the path ahead of time since it will be under the VTDATAROOT directory.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Done

Comment on lines +27 to +29
```bash
$ ./401_backup.sh
```
Copy link
Member

Choose a reason for hiding this comment

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

There is an inconsistency here between how you run 401 and 402. One contains a $ and the other does not, let's make it consistent please.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Ok added $ to each scripts for maling it consistent

Copy link
Member

Choose a reason for hiding this comment

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

teardown does not have it


Expected Output
When you run the restore script, the following output can be expected:
```bash
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
```bash

Copy link
Member

Choose a reason for hiding this comment

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

remove bash

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Done


## Local Environment Backup And Restore Steps:

### Adding a Backup for Local Environment
Copy link
Member

@frouioui frouioui Oct 14, 2024

Choose a reason for hiding this comment

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

Suggested change
### Adding a Backup for Local Environment
### Taking a Backup

Comment on lines 30 to 32
This will start the backup process for the customer keyspace and all its shards.

When you run the script, the following output can be expected:
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
This will start the backup process for the customer keyspace and all its shards.
When you run the script, the following output can be expected:
This will start the backup process for the customer keyspace and all its shards. When you run the script, the following output can be expected:


For example, navigating to the directory:
```bash
$ cd /vtdataroot/backups
Copy link
Member

Choose a reason for hiding this comment

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

i think using $VTDATAROOT makes more sense, people might not use /vtdataroot

Comment on lines 72 to 87
shail_pujan@SHAIL-PUJAN:~/vtdataroot/backups $ ls
customer
shail_pujan@SHAIL-PUJAN:~/vtdataroot/backups$ cd customer
shail_pujan@SHAIL-PUJAN:~/vtdataroot/backups/customer$ ls
-80 80-
ls -l ./-80/ ./80-/
./-80/:
total 4
drwxr-xr-x 2 shail_pujan shail_pujan 4096 Oct 12 12:15 2024-10-12.064518.zone1-0000000300

./80-/:
total 4
drwxr-xr-x 2 shail_pujan shail_pujan 4096 Oct 12 12:15 2024-10-12.064523.zone1-0000000401

shail_pujan@SHAIL-PUJAN:~/vtdataroot/backups/customer$ cd ./-80/2024-10-12.064518.zone1-0000000300
shail_pujan@SHAIL-PUJAN:~/vtdataroot/backups/customer/-80/2024-10-12.064518.zone1-0000000300$ ls -l
Copy link
Member

Choose a reason for hiding this comment

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

In this block, there is a mix of command thats begins with $ and with shail_pujan@ ..., so it is a little hard to understand what is going on.

Copy link
Collaborator Author

@shailpujan88 shailpujan88 Oct 14, 2024

Choose a reason for hiding this comment

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

shall we remove shail_pujan?

Copy link
Member

Choose a reason for hiding this comment

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

i think it would be better yes

Copy link
Member

Choose a reason for hiding this comment

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

also it is not clear what instructions we need to follow because the first step is cd /vtdataroot/backups but then we are in ~/vtdataroot/backups

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Ok done

```
This will safely remove the cluster and associated data, ensuring a clean environment without manual deletions.

If needed, use the [vtctldclient](../../backup-and-restore/managing-backups)command to remove specific backups, but this is generally not required if you are running the teardown script.
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
If needed, use the [vtctldclient](../../backup-and-restore/managing-backups)command to remove specific backups, but this is generally not required if you are running the teardown script.
If needed, use the [vtctldclient](../../backup-and-restore/managing-backups) command to remove specific backups, but this is generally not required if you are running the teardown script.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

done with changes.

```bash
./501_teardown.sh
```
This will safely remove the cluster and associated data, ensuring a clean environment without manual deletions.
Copy link
Member

Choose a reason for hiding this comment

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

this sentence feels redundant with what we have already written above

Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
This will safely remove the cluster and associated data, ensuring a clean environment without manual deletions.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

done with changes

…stent commands, clearer outputs, and improved directory navigation.

Signed-off-by: Shail Pujan <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants