Skip to content

Conversation

GabrielBrascher
Copy link
Member

Fix mysqldump command in the "Database Preparation" section.

Nowadays it is:

$ mysqldump -u root -p -R cloud > cloud-backup_`date '+%Y-%m-%d'.sql
$ mysqldump -u root -p cloud_usage > cloud_usage-backup_`date '+%Y-%m-%d'.sql

This won't work as it is missing a grave accent () in ``date '+%Y-%m-%d'..
Should be:

$ mysqldump -u root -p -R cloud > cloud-backup_`date '+%Y-%m-%d'`.sql
$ mysqldump -u root -p cloud_usage > cloud_usage-backup_`date '+%Y-%m-%d'`.sql

@GabrielBrascher
Copy link
Member Author

@blueorangutan docbuild

@blueorangutan
Copy link

@GabrielBrascher a Jenkins job has been kicked to build the document. I'll keep you posted as I make progress.

@blueorangutan
Copy link

Doc build preview: http://qa.cloudstack.cloud/docs/WIP-PROOFING/pr/255. (SL-JID 172)

@rohityadavcloud
Copy link
Member

rohityadavcloud commented Dec 2, 2021

@GabrielBrascher would it be safer to use the $(cmd) syntax? Also improves readability over `?

@GabrielBrascher
Copy link
Member Author

@rhtyd good point, $(cmd) looks like a better option indeed.
I will update the changes, thanks!

@GabrielBrascher
Copy link
Member Author

@blueorangutan docbuild

@blueorangutan
Copy link

@GabrielBrascher a Jenkins job has been kicked to build the document. I'll keep you posted as I make progress.

@blueorangutan
Copy link

Doc build preview: http://qa.cloudstack.cloud/docs/WIP-PROOFING/pr/255. (SL-JID 173)

@weizhouapache
Copy link
Member

@GabrielBrascher I know only date is used in old docs. would it be better to use date and time like the following ?

$ echo cloud-backup_$(date +%Y-%m-%d-%H%M%S).sql
cloud-backup_2021-12-02-165439.sql

@GabrielBrascher
Copy link
Member Author

@weizhouapache I assume that as the upgrade is a process that is done in one day it would not be needed, I don't imagine more than one backup at a day at least for the given operaiton.

But it looks like a good "safety" command in case someone backs up the DB before and after the upgrade and ends up overriding the first backup.

@GabrielBrascher
Copy link
Member Author

Updated to @weizhouapache suggestions.

@blueorangutan docbuild

@blueorangutan
Copy link

@GabrielBrascher a Jenkins job has been kicked to build the document. I'll keep you posted as I make progress.

@blueorangutan
Copy link

Doc build preview: http://qa.cloudstack.cloud/docs/WIP-PROOFING/pr/255. (SL-JID 174)

Copy link
Member

@weizhouapache weizhouapache left a comment

Choose a reason for hiding this comment

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

LGTM !

@rohityadavcloud
Copy link
Member

Lgtm

@rohityadavcloud rohityadavcloud merged commit 04a58e3 into apache:main Dec 3, 2021
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.

4 participants