Quantcast
Channel: MySQL Forums - Backup
Viewing all 537 articles
Browse latest View live

mysqlbackup preparing the backup for restore fails (no replies)

$
0
0
Hello,

I'm folloing the instructions from the "MySQL Enterprise Backup 3.12 User's Guide - Chapter 6 Using MySQL Enterprise Backup with Replication"

I'm able to take the successful backup from master & copied it over to the slave. On slave when i'm trying to prepare the backup for restore using apply-log option I'm getting an error as listed below,



[root@mysqlslave x]# mysqlbackup --backup-dir=/usr/x/mysql_backup/ apply-log
MySQL Enterprise Backup version 4.0.3 Linux-3.8.13-118.4.2.el7uek.x86_64-x86_64 [2016/08/04]
Copyright (c) 2003, 2016, Oracle and/or its affiliates. All Rights Reserved.

mysqlbackup: INFO: Starting with following command line ...
mysqlbackup --backup-dir=/usr/xmysql_backup/ apply-log

mysqlbackup: INFO:
IMPORTANT: Please check that mysqlbackup run completes successfully.
At the end of a successful 'apply-log' run mysqlbackup
prints "mysqlbackup completed OK!".

mysqlbackup: [Warning] World-writable config file '/usr/x/mysql_backup/backup-my.cnf' is ignored.
160908 13:52:02 mysqlbackup: INFO: MEB logfile created at /usr/x/mysql_backup/meta/MEB_2016-09-08.13-52-02_apply_log.log

mysqlbackup: ERROR: Mandatory parameter innodb_data_file_path is missing in
backup-my.cnf config file: /usr/x/mysql_backup/backup-my.cnf
mysqlbackup: ERROR: Could not load contents of directory '/usr/x/mysql_backup/'.

mysqlbackup failed with errors!


Could someone guide me if i'm missing anything here...

Thank you.

backup database Event (no replies)

$
0
0
Hola a Todos estoy tratando de crear un evento que respalde la base de datos, de hecho lo he creado, no tiene errores sin embargo no da resultados, este es el codigo:


DELIMITER $$

CREATE DEFINER=`paccds`@`%` EVENT `respaldoinfo` ON SCHEDULE EVERY 1 DAY STARTS '2016-10-14 08:13:00' ON COMPLETION NOT PRESERVE ENABLE DO BEGIN
DECLARE done INT DEFAULT 0;
DECLARE ruta VARCHAR(250);
DECLARE nombretabla VARCHAR(250);
DECLARE cursor1 CURSOR FOR SELECT table_name FROM information_schema.tables WHERE table_schema='empresax' AND TABLE_TYPE ='BASE TABLE';
DECLARE CONTINUE HANDLER FOR NOT FOUND SET done = 1;
OPEN cursor1;
read_loop: LOOP
FETCH cursor1 INTO nombretabla;

IF done THEN
LEAVE read_loop;
END IF;


SET @ruta = CONCAT('c:/conta/respaldos/',nombretabla,'.bkp');


SET @cadenaSql = CONCAT("SELECT * FROM ", nombretabla, " INTO OUTFILE ", @ruta, " FIELDS TERMINATED BY '|' ENCLOSED BY ';' LINES TERMINATED BY '\r\n'");
PREPARE s1 FROM @cadenaSql;
EXECUTE s1;
DEALLOCATE PREPARE s1;

END LOOP;
CLOSE cursor1;

END$$

DELIMITER ;

Purging MySQL Backups (no replies)

$
0
0
I am looking for a way to purge mysql backups every 2 weeks. I am using mysql enterprise backup in a windows environment (windows server 2012 r2)..

ERROR 1146 (42S02) During Database restore. Ver: 5.1.54-community (no replies)

$
0
0
I have a MYSQL server with multiple databases, I use a batch file + task scheduler to back up my databases on daily basis. During restore of one of the database using Mysql Workbench on a new server with same MYSQL server version (5.1.54-community) I encountered ERROR 1146 (42S02) at line 18819: Table 'DB2.rhicd5_hic_desc' doesn't exist
This is wired as DB2 is not the database I was restoring. Somehow DB1 (database being restored) has reference to 'DB2.rhicd5_hic_desc' (a view from second database on my old server).
Command to backup database:
C:\Program Files\MySQL\MySQL Server 5.1\bin\mysqldump.exe" --user=%dbuser% --password=%dbpass% --databases %db% > "%db%.%backupdate%.sql"

Someone please help me understand why this is happening and how can I do a clean backup.

Server 1 OS : windows 2012
MYSQL ver : 5.1.54-community
Server 2 OS : windows 2012
MYSQL ver : 5.1.54-community

backup history (no replies)

$
0
0
Hello,

I am using mysql 5.7.14 - MySQL Community Server (GPL). How can I get a backup history of backups done for databases on this server?

Backup data error? (1 reply)

$
0
0
I have problems when backing up data, what should I do?

Cross platform backup and restore (no replies)

$
0
0
Hi all,

We are running MySQL 5.5 on Solaris 10 and are looking to migrate to CentOS. I am looking whether we can run mysqldump from Solaris and restore the backup file to Linux (on the same version 5.5) Whether there will be a problem during the restore. If not, what would be the best way to do such a migration.

thank you

benny

Not able to create log-bin file (no replies)

$
0
0
i tried to create log-bin with the following code in my.ini

[mysqld]
log-bin=mysql-bin.0000143
binlog-do-db=new11

but it is not creating mysql-bin.0000143, do guide me on this to achieve the incremental backup..

ndb_restore fails (no replies)

$
0
0
Hello,

I've been trying with intermittent success to restore my ndb_backups to a new cluster.

We have a 6 NDB node cluster with 3 API nodes. When I run an ndb_restore, usually the first 2 or 3 node backups get pulled in without issue. But the 4th and 5th node fail with the following error:

Temporary error: 266: Time-out in NDB, probably caused by deadlock
Temporary error: 266: Time-out in NDB, probably caused by deadlock
Retried transaction 10 times.
Last error266: Time-out in NDB, probably caused by deadlock
...Unable to recover from errors. Exiting...

Strangely, sometimes I can simply rerun the backup and it finishes without error.

I'm hoping someone knows what kind of tweaks I can make to my configuration to optimize this process. Here are my version numbers and configs:

mysql-5.6.22 ndb-7.3.8

######################
#MGM CONFIG
######################
[ndbd default]
# Options affecting ndbd processes on all data nodes:
NoOfReplicas=2 # Number of replicas
DataMemory=8144M # How much memory to allocate for data storage
IndexMemory=8144M # How much memory to allocate for index storage
# For DataMemory and IndexMemory, we have used the
# default values. Since the "world" database takes up
# only about 500KB, this should be more than enough for
# this example Cluster setup.

[ndb_mgmd]
# Management process options:
hostname=192.168.207.133 # Hostname or IP address of MGM node
NodeId=1

[ndb_mgmd]
# Management process options:
hostname=192.168.207.45 # Hostname or IP address of MGM node
NodeId=2

[ndbd]
# Options for data node "A":
hostname=192.168.207.135 # Hostname or IP address
NodeId=3

[ndbd]
# Options for data node "B":
hostname=192.168.207.171 # Hostname or IP address
NodeId=4


[ndbd]
# Options for data node "C":
hostname=192.168.207.174 # Hostname or IP address
NodeId=5


[ndbd]
# Options for data node "D":
hostname=192.168.207.27 # Hostname or IP address
NodeId=6


[ndbd]
# Options for data node "E":
hostname=192.168.207.169 # Hostname or IP address
NodeId=7


[ndbd]
# Options for data node "F":
hostname=192.168.207.178 # Hostname or IP address
NodeId=8


[mysqld]
hostname=192.168.207.177
NodeId=10

[mysqld]
hostname=192.168.207.35
NodeId=11

[mysqld]
hostname=192.168.207.148
NodeId=12

######################
#API CONFIG
######################
[mysqld]
ndbcluster

[mysql_cluster]
ndb-connectstring=192.168.207.133,192.168.207.45 # location of management server

######################
#NDB CONFIG
######################




Really hope someone can help. I've been at this for a month.

export using shell execute command (1 reply)

$
0
0
using the shell execution command, the exported database is not storing in the file that we are going to give ...so can you kindly tell me what we need to pass in the parameter of the shell execution command

please find the below code

ShellExecute(Application.Handle,'open','mysqldump.exe ',' -u root -ppassword dbname > sqlfile.sql -f ',nil,SW_SHOW);

New install with backup from older version (2 replies)

$
0
0
What is the best way to do a clean install of MySQL 5.6 with data from mysql 5.5.46?

My computer (running mysql 5.5.46) just broke down (actualy it started to burn, but that is another story). So I had to buy a new one and decieded to take the chance to upgrade to the newest Ubuntu-Version which comes with MySQL 5.6.

Unfortunatly I failed completly at restoring the old data - i've several backups of the MySQL data-folder and all files from the old PC are undamaged as well. But whenever I try to restore the old ibdata-files the MySQl server just crashes.

So before I try it again: What is the best clean way to do this? How can I restore my old data-folder?

MySQL Incremental backup (no replies)

$
0
0
Hi,


I am new to mysql server,i have database around 200 GB size,

Please provide shell script to take incremental backup through mysqldump and binlog


Thanks,
Sudeep

MySQLBACKUP failed (1 reply)

$
0
0
Dears,

Im trying to run the below MySQLBACKUP script:

/var/lib/mysql/meb-3-7-1-el6-x86-64bit/bin/mysqlbackup --port=3306 --protocol=tcp --user=root --password --with-timestamp --backup-dir=/usr/protei/backup/ backup


but always I got this error:

mysqlbackup: INFO: Backing up the database directory '.mc'
mysqlbackup: ERROR: Source database directory should contain only files.
Found Subdirectory = /var/lib/mysql/.mc/cedit
mysqlbackup: ERROR: Cannot backup table `.mc`.`cedit`
mysqlbackup: ERROR: Cannot backup database '.mc'
mysqlbackup: ERROR: Backup of non-innodb tables failed.!
160229 12:07:36 mysqlbackup: INFO: All tables unlocked
Error: operation failed. global_error_count: 4 backup_config.error_count: 1


Please advise :)

Find below full backup log (which is failed)


MySQL Enterprise Backup version 3.7.1 [2012/03/20]
Copyright (c) 2003, 2012, Oracle and/or its affiliates. All Rights Reserved.

INFO: Starting with following command line ...
/var/lib/mysql/meb-3-7-1-el6-x86-64bit/bin/mysqlbackup --port=3306
--protocol=tcp --user=root --password --with-timestamp
--backup-dir=/usr/protei/backup/ backup

Enter password:
INFO: Got some server configuration information from running server.

IMPORTANT: Please check that mysqlbackup run completes successfully.
At the end of a successful 'backup' run mysqlbackup
prints "mysqlbackup completed OK!".

--------------------------------------------------------------------
Server Repository Options:
--------------------------------------------------------------------
datadir = /var/lib/mysql/
innodb_data_home_dir = /var/lib/mysql/
innodb_data_file_path = ibdata1:10M:autoextend
innodb_log_group_home_dir = /var/lib/mysql/
innodb_log_files_in_group = 2
innodb_log_file_size = 268435456

--------------------------------------------------------------------
Backup Config Options:
--------------------------------------------------------------------
datadir = /usr/protei/backup/2016-02-29_12-07-32/datadir
innodb_data_home_dir = /usr/protei/backup/2016-02-29_12-07-32/datadir
innodb_data_file_path = ibdata1:10M:autoextend
innodb_log_group_home_dir = /usr/protei/backup/2016-02-29_12-07-32/datadir
innodb_log_files_in_group = 2
innodb_log_file_size = 268435456

mysqlbackup: INFO: Unique generated backup id for this is 14567404527203314
mysqlbackup: INFO: Uses posix_fadvise() for performance optimization.
mysqlbackup: INFO: System tablespace file format is Antelope.
mysqlbackup: INFO: Found checkpoint at lsn 4629701.
mysqlbackup: INFO: Starting log scan from lsn 4629504.
160229 12:07:32 mysqlbackup: INFO: Copying log...
160229 12:07:32 mysqlbackup: INFO: Log copied, lsn 4629701.
We wait 1 second before starting copying the data files...
160229 12:07:33 mysqlbackup: INFO: Copying /var/lib/mysql/ibdata1 (Antelope file format).
160229 12:07:36 mysqlbackup: INFO: Copying /var/lib/mysql/mysql/slave_relay_log_info.ibd (Antelope file format).
160229 12:07:36 mysqlbackup: INFO: Copying /var/lib/mysql/mysql/slave_master_info.ibd (Antelope file format).
160229 12:07:36 mysqlbackup: INFO: Copying /var/lib/mysql/mysql/innodb_table_stats.ibd (Antelope file format).
160229 12:07:36 mysqlbackup: INFO: Copying /var/lib/mysql/mysql/slave_worker_info.ibd (Antelope file format).
160229 12:07:36 mysqlbackup: INFO: Copying /var/lib/mysql/mysql/innodb_index_stats.ibd (Antelope file format).
160229 12:07:36 mysqlbackup: INFO: Copying /var/lib/mysql/rp/MailboxStorageInfoHistory.ibd (Antelope file format).
160229 12:07:36 mysqlbackup: INFO: Copying /var/lib/mysql/rp/COS.ibd (Antelope file format).
160229 12:07:36 mysqlbackup: INFO: Copying /var/lib/mysql/rp/System.ibd (Antelope file format).
160229 12:07:36 mysqlbackup: INFO: Copying /var/lib/mysql/rp/Session.ibd (Antelope file format).
160229 12:07:36 mysqlbackup: INFO: Copying /var/lib/mysql/rp/DeliverySchedule.ibd (Antelope file format).
160229 12:07:36 mysqlbackup: INFO: Copying /var/lib/mysql/rp/WHC_Profile.ibd (Antelope file format).
160229 12:07:36 mysqlbackup: INFO: Copying /var/lib/mysql/rp/Message.ibd (Antelope file format).
160229 12:07:36 mysqlbackup: INFO: Copying /var/lib/mysql/rp/Profile.ibd (Antelope file format).
160229 12:07:36 mysqlbackup: INFO: Copying /var/lib/mysql/rp/DATABASECHANGELOG.ibd (Antelope file format).
160229 12:07:36 mysqlbackup: INFO: Copying /var/lib/mysql/rp/ProfileCosHistory.ibd (Antelope file format).
160229 12:07:36 mysqlbackup: INFO: Copying /var/lib/mysql/rp/Account.ibd (Antelope file format).
160229 12:07:36 mysqlbackup: INFO: Copying /var/lib/mysql/rp/DATABASECHANGELOGLOCK.ibd (Antelope file format).
160229 12:07:36 mysqlbackup: INFO: Copying /var/lib/mysql/rp/DeletingMessage.ibd (Antelope file format).
160229 12:07:36 mysqlbackup: INFO: Copying /var/lib/mysql/rp/Welcome.ibd (Antelope file format).
mysqlbackup: INFO: Preparing to lock tables: Connected to mysqld server.
160229 12:07:36 mysqlbackup: INFO: Starting to lock all the tables....
160229 12:07:36 mysqlbackup: INFO: All tables are locked and flushed to disk
mysqlbackup: INFO: Opening backup source directory '/var/lib/mysql/'
160229 12:07:36 mysqlbackup: INFO: Starting to backup all files in subdirectories of '/var/lib/mysql/'
mysqlbackup: INFO: Backing up the database directory '.mc'
mysqlbackup: ERROR: Source database directory should contain only files.
Found Subdirectory = /var/lib/mysql/.mc/cedit
mysqlbackup: ERROR: Cannot backup table `.mc`.`cedit`
mysqlbackup: ERROR: Cannot backup database '.mc'
mysqlbackup: ERROR: Backup of non-innodb tables failed.!
160229 12:07:36 mysqlbackup: INFO: All tables unlocked
Error: operation failed. global_error_count: 4 backup_config.error_count: 1

-------------------------------------------------------------
Parameters Summary
-------------------------------------------------------------
Start LSN : 0
End LSN : 0
-------------------------------------------------------------

SQL Script to get the queries which are using full table scan (2 replies)

$
0
0
Hi,

I am working in a data warehouse environment which is on MySQL.

Now we are seeing the performance issues on MySQL and i am new to MySQL performance tuning.

I need to get the list of queries which are using full table scan and start the tuning.

can you please help me to get the script or any other options to get the queries which are using full table scan ?

Thanks,
Vinodh Selvaraj

Dump of only one record (3 replies)

$
0
0
I use MYSQLDUMP for backup purposes have have been doing so for years. I just realized that for one table it is only backing up the first record, then goes on to the next table. No error, no message. I didn't know it was happening. Other tables have always worked, or so I thought. Now I have to check every one. What is happening and how do I fix it?

housekeeping mysql.backup_history and backup_progress tables (no replies)

$
0
0
Hi,

I am using mysql enterprise backup to backup mysql database
I have one question
the tables mysql.backup_history and backup_progress keep growing
May I know how I can housekeep those tables

thank you

Importing backups. (10 replies)

$
0
0
Hello,

I run a small minecraft community and therefor use mysql (most used for this game). And with running communities I need backups etc,

Now the issue I have is that importing files is extremely slow. Importing a self contained file takes an insane amount of time. 4.4GB file is running for over 4 hours as I speak.

now you may think it's a slow internet connection, but I don't use a network for this. The file is already on the machine. This is no slow machine either, it's dedicated to do very low amount of things, and mysql does not seem to do anything as it's averaging 0.1% cpu usage. Disk (SSD) usage is a bit higher peaking at about 50 MB a second.

I do use mysql workbench on a Windows machine, with an Intel SSD and 32GB, CPU Intel e3 1270v3

Is there any reason this is taking such an insane long amount of time?

Please be easy on me, I just do this to provide kids a good time for free without any real knowledge of mysql :)

Automatic Backup Not Working (2 replies)

$
0
0
I'm currently running daily backups manually for my daily backup. I went into the schedule tab of MySQL Administrator to try and set up a daily backup which was not successful. Aside from the settings in the Schedule tab, am I missing something that's causing my backup not to perform automatically?

mysqldump and binlog (no replies)

$
0
0
I am new to mysql server,i have database around 200 GB size,

Please provide shell script to take incremental backup through mysqldump and binlog


Thanks,
Josh Davidson

MySql backup linux server (no replies)

$
0
0
How to backup mysql linux server?
Viewing all 537 articles
Browse latest View live


<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>