7.2 Error codes of MySQL Enterprise Backup

The return code of the MySQL Enterprise Backup (mysqlbackup) process is 0 if the backup or restore run succeeds. If the run fails for any reason, the return code is set to the OS error code.

If mysqlbackup fails, because an operating system call fails, mysqlbackup usually displays the operating systems error code along with a detailed error message.

On Linux and other Unix-like systems, the operating system error codes are POSIX error codes. Those POSIX error codes that are possible with mysqlbackup are shown in Table 7.1, “OS Errors for Linux and Other Unix-Like Systems”. A complete list of all POSIX errors is available in the file /usr/include/errno.h on your system.

Table 7.1 OS Errors for Linux and Other Unix-Like Systems

Error code

Value

Description

EPERM

1

Operation not permitted

ENOENT

2

No such file or directory

ESRCH

3

No such process

EINTR

4

Interrupted system call

EIO

5

I/O error

ENXIO

6

No such device or address

EBADF

9

Bad file number

EAGAIN

11

Try again

ENOMEM

12

Out of memory

EACCES

13

Permission denied

EBUSY

16

Device or resource busy

EEXIST

17

File exists

ENODEV

19

No such device

ENOTDIR

20

Not a directory

EMFILE

24

Too many open files

EFBIG

27

File too large

ENOSPC

28

No space left on device

EROFS

30

Read-only file system

ENAMETOOLONG

36

File name too long

ENODATA

61

No data available

ETIME

62

Timer expired

EBADFD

77

File descriptor in bad state

EDQUOT

122

Quota exceeded


On Microsoft Windows, mysqlbackup uses Win32 API calls. The Windows System Error codes possible with mysqlbackup are listed in Table 7.2, “OS Errors for Windows Systems”. A complete list of all Windows System errors is available at http://msdn2.microsoft.com/en-us/library/ms681381(VS.85).aspx.

Table 7.2 OS Errors for Windows Systems

Error code

Value

Description

ERROR_SUCCESS

0

The operation completed successfully.

ERROR_FILE_NOT_FOUND

2

The system cannot find the file specified.

ERROR_PATH_NOT_FOUND

3

The system cannot find the path specified.

ERROR_TOO_MANY_OPEN_FILES

4

The system cannot open the file.

ERROR_ACCESS_DENIED

5

Access is denied.

ERROR_NOT_ENOUGH_MEMORY

8

Not enough storage is available to process this command.

ERROR_OUTOFMEMORY

14

Not enough storage is available to complete this operation.

ERROR_INVALID_DRIVE

15

The system cannot find the drive specified.

ERROR_WRITE_PROTECT

19

The media is write protected.

ERROR_BAD_UNIT

20

The system cannot find the device specified.

ERROR_NOT_READY

21

The device is not ready.

ERROR_SEEK

25

The drive cannot locate a specific area or track on the disk.

ERROR_WRITE_FAULT

29

The system cannot write to the specified device.

ERROR_READ_FAULT

30

The system cannot read from the specified device.

ERROR_GEN_FAILURE

31

A device attached to the system is not functioning.

ERROR_HANDLE_DISK_FULL

39

The disk is full.

ERROR_BAD_NETPATH

53

The network path was not found.

ERROR_DEV_NOT_EXIST

55

The specified network resource or device is no longer available.

ERROR_FILE_EXISTS

80

The file exists.