1 
2 #ifndef XTRABACKUP_BACKUP_COPY_H
3 #define XTRABACKUP_BACKUP_COPY_H
4 
5 #include <my_global.h>
6 #include <mysql.h>
7 #include "datasink.h"
8 
9 /* special files */
10 #define XTRABACKUP_SLAVE_INFO "xtrabackup_slave_info"
11 #define XTRABACKUP_GALERA_INFO "xtrabackup_galera_info"
12 #define XTRABACKUP_BINLOG_INFO "xtrabackup_binlog_info"
13 #define XTRABACKUP_INFO "xtrabackup_info"
14 
15 extern bool binlog_locked;
16 
17 bool
18 backup_file_printf(const char *filename, const char *fmt, ...)
19 		ATTRIBUTE_FORMAT(printf, 2, 0);
20 
21 /************************************************************************
22 Return true if first and second arguments are the same path. */
23 bool
24 equal_paths(const char *first, const char *second);
25 
26 /************************************************************************
27 Copy file for backup/restore.
28 @return true in case of success. */
29 bool
30 copy_file(ds_ctxt_t *datasink,
31 	  const char *src_file_path,
32 	  const char *dst_file_path,
33 	  uint thread_n);
34 
35 /** Start --backup */
36 bool backup_start(CorruptedPages &corrupted_pages);
37 /** Release resources after backup_start() */
38 void backup_release();
39 /** Finish after backup_start() and backup_release() */
40 bool backup_finish();
41 bool
42 apply_log_finish();
43 bool
44 copy_back();
45 bool
46 decrypt_decompress();
47 bool
48 is_path_separator(char);
49 bool
50 directory_exists(const char *dir, bool create);
51 
52 lsn_t
53 get_current_lsn(MYSQL *connection);
54 bool backup_file_print_buf(const char *filename, const char *buf, int buf_len);
55 
56 #endif
57