-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmain.cpp
More file actions
28 lines (21 loc) · 732 Bytes
/
main.cpp
File metadata and controls
28 lines (21 loc) · 732 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
#include <QCoreApplication>
#include "myqbackupmain.h"
#include <mysql.h>
MYSQL *conn;
/* incremental mode
* --incremental-copies=N
* for first run it makes a full backup
* for each run in 2-N incremental based on previous incremental backup created
* for N+1 run we applying first incremental to full backup and making backup based on N
* */
int main(int argc, char *argv[])
{
// having different thread id after running mysql_init
conn = mysql_init(NULL);
QCoreApplication a(argc, argv);
MyQBackupMain* backupcontroller = new MyQBackupMain(&a);
QObject::connect(backupcontroller, SIGNAL(terminate()),
&a, SLOT(quit()));
backupcontroller->start();
return a.exec();
}