Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: Added the Databases Backup documentation; minor formatting

Projects Backup

In the event we need to reference anything that was ever on RHEL 6 (projects, that is), it would be wise to have a tarball of all artifacts under /apps folder, as well as all the databases that were created for each of the projects... 

...

Perfect! Was able to create a tarball successfully!


Now... the databases

I went through the phpMyAdmin interface and exported each database individually... but, I wanted to try the same via the command line interface, using the `mysqldump` command... After some (quick) research, I came across the following discussion on SO, which made sense and proved to be a good solution! — specifically, this response.

In order to do a comprehensive backup, the following command was used in the CLI

Code Block
languagebash
themeRDark
titleMySQL Dump Command
linenumberstrue
mysqldump -u root -p -A -R -E --triggers --single-transaction > full_backup.sql

Image Added


Got the following error:

mysqldump: Got error: 1045: Access denied for user 'root'@'localhost' (using password: YES) when trying to connect

Wait... what?! Access denied for root user?

I proceeded to create a new user, called it backup and granted access to all databases on RHEL6.... and then here's the result:

Code Block
languagebash
themeRDark
linenumberstrue
mysqldump -u backup -p -A -R -E --triggers --single-transaction > full_backup.sql

Image Added