MySQL backup
Forum
  1. Forums
  2. CloudLinux and Control Panels
  3. CloudLinux and cPanel
  1. Fernando Barajas
  2. 30.05.2015
  3.  Subscribe via email
Backup instructions on manual
Rate this post:
  1. 30.05.2015 13:05:46
  2. # 1
Fernando Barajas Accepted Answer
Posts: 3
Joined: 07.05.2015
0
Votes
Undo
Hi!  I'm reading the backup instructions:




$ mkdir -p ~/mysqlbkp
$ service mysql restart --skip-networking --skip-grant-tables
$ mysql_upgrade
$ mysqldump --all-databases --routines --triggers > ~/mysqlbkp/dbcopy.sql
$ service mysql stop
$ cp -r /var/lib/mysql/mysql ~/mysqlbkp/
$ service mysql start




Isn't this redundant?  As far as I understand, with the mysqldump command, you're backing all the databases, and then with the cp -r command you are backing them again, isn't it?

If so, since I don't have that much space for a dual backup, which one would be a better option?

Thanks!
  1. 30.05.2015 19:05:56
  2. # 2
Fernando Barajas Accepted Answer
Posts: 3
Joined: 07.05.2015
0
Votes
Undo
While running mysql_upgrade, I get the following error:


Running 'mysql_fix_privilege_tables'...
ERROR 1062 (23000) at line 708: Duplicate entry 't1rue2kea3dv-wwwtrue_true' for key 'PRIMARY'
FATAL ERROR: Upgrade failed

How can I fix that?

Thanks!
  • Page :
  • 1


There are no replies made for this post yet.
Be one of the first to reply to this post!
Guest
Submit Your Response
Upload files or images for this discussion by clicking on the upload button below. Supports gif,jpg,png,zip,rar,pdf
• Insert • Remove Upload Files (Maximum File Size: 2 MB)
Captcha
To protect the site from bots and unauthorized scripts, we require that you enter the captcha codes below before posting your question.