forked from ushelp/EasyBackup
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathreadme_en.md
680 lines (478 loc) · 24.9 KB
/
readme_en.md
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
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
# EasyBackup
EasyBackup is a free open-source Java-based, cross-platform content backup, content compression, remote sending task scheduling application and engine framework.
Provide full support for the need to backup the content: Collection of content-based task scheduling backups, content compression, remote sending, command execution and more. And all this, just a simple configuration management to complete.
Please choose according to purpose:
- **EasyBackup Application**: Can run as application (`libs/easybackup_application`)
- **EasyBackup Engine Framework**: Can be extended as the content backup engine framework for Java (`libs/easybackup_engine_framework`)
**Latest version**: `3.3.2-RELEASE`
## TOC
- [EasyBackup Feature](#easybackup-feature)
- [Easy Backup main components](#easy-backup-main-components)
- [BackupConfiguration](#backupconfiguration)
- [Properties](#properties)
- [Configuration Structure](#configuration-structure)
- [Global configuration(monitoring service as a global default configuration, optional)](#global-configurationmonitoring-service-as-a-global-default-configuration-optional)
- [Backup Service Configuration(You can override the default global configuration)](#backup-service-configurationyou-can-override-the-default-global-configuration)
- [User custom configuration instructions](#user-custom-configuration-instructions)
- [Variables](#variables)
- [Examples of fully configured](#examples-of-fully-configured)
- [Mail template configuration](#mail-template-configuration)
- [Custom template configuration](#custom-template-configuration)
- [Template built-in variables](#template-built-in-variables)
- [EasBackup Application](#easbackup-application)
- [Plugins:](#plugins)
- [Steps for usage](#steps-for-usage)
- [EasyBackup Engine Framework](#easybackup-engine-framework)
- [Steps for usage](#steps-for-usage-1)
- [Custom Interface](#custom-interface)
- [Custom Properties File and Freemarker Configuration object](#custom-properties-file-and-freemarker-configuration-object)
- [Runtime access to information](#runtime-access-to-information)
- [Plugins](#plugins-1)
- [EasyBackup Web Manger](#easybackup-web-manger)
- [End](#end)
## EasyBackup Feature
- **TThe content compression backup send Engine Framework out of the box can run**
- **Multiple optional compression format**. Support ` ZIP ` ` GZIP `, ` TAR ` format, etc
- **Send remote backup**. Support will be sent to the mailbox backup, network storage, etc.
- **Flexible scheduling configuration**. It supports `CronExpression` monitoring task scheduling
- **Enhanced plug-in expansion**. Scalable database backup, and so achieve; custom target source file ( `TargetFile`) and backup file objects (` BackupDir`, `BackupFile`), custom backup achieve (` Backup`), custom interceptor ( `Interceptor` ), custom sender ( `Sender`).
- **Interceptor support**. Support command and a custom class based on the pre-post-interceptor
- **Custom notification templates**. Based on a custom template `freemarker` notification support built-in variables, update the template automatically reloaded
- **Heat load**. Support hot during operation to modify `easybackup.properties`, modify the monitoring configuration parameters without rebooting EasyBackup
- **Multiple directory support**. Which can backup files to multiple target directories
- **Multi-Service Support**. You can run multiple backup compression send service
- **Runtime feedback**. Get backup runtime infomation
- **Simple and flexible configuration**.
## Easy Backup main components
- **Backup**
Can be configured for `File` (file backup),` USER` (user-defined backup, such as database backups, and so on) are two types of backup services. Backup files directly to support backup compression and backup.
- **Compression**
Support will target file compression as `ZIP`,` GZIP`, `TAR` other formats.
- **Sender**
When the backup is complete, the results will be sent back up to `Email`,` Web Storage` and so on, a backup service can have multiple Sender.
- **Commander&Class Interceptor**
Before and after the backup start and finish automatically execute the appropriate command to intercept and classes.
- **Task Schedule**
`CronExpression` based backup task scheduling.
![EasyBackup principal components](images/EasyBackup.png)
## BackupConfiguration
- **Backup term**:
- `targetFile`: Destination file to be backed up
- `dir`, `backupDir`: Backup file storage directory
- `file`, `backupFile`: Backup file name
- **BackupConfiguration Object**
It encapsulates the data required for each of the backup service and configuration information ( `basic`), complete configuration information (` properties`), scheduling information ( `task schedure`), interceptor information (` interceptor`), backup files information ( `targetFile`,` backupDir`, `backupFile`), compressed information (` compress`) and the sender ( `senders`).
![BackupConfiguration](images/BackupConfiguration.png)
- **BackupJob**
Easy Backup based on `Backup Configuration` object, creating monitoring Job.
![EasyBackup Job](images/BackupConfigurationJob.png)
## Properties
`easybackup.properties` is EasyBackup core configuration files, configuration all the information required for the backup content.
### Configuration Structure
![EasyBackup Properties](images/EasyBackupProperties.png)
### Global configuration(monitoring service as a global default configuration, optional)
```properties
# Backup ON or OFF, default is ON
easybackup.enable=ON
# Backup trigger Cron-Expressions
easybackup.cronexpression=0 30 * * * ?
# Directory to store the backup file
# You can specify more than one, separated by a ;
easybackup.dir=/user/backup/
# backup file name under 'easybackup.backup.dir' directory
# If not specified, the automatically generated file name is 'targetFileName-yyyyMMddHHmmssS[.zip|tar|tar.gz]'
# you can use variable: ${targetFileName}, ${name}, ${type}, ${value}, ${backuptime}, ${backupConfiguration.XXX}
easybackup.file=
# Whether backup compression, default is OFF
easybackup.compress=OFF
# Compression format: TAR(*.tar), ZIP(*.zip), GZIP(*.tar.gz), default is ZIP
easybackup.compressType=ZIP
# Comprssion encoding
easybackup.compressEncoding=
# Whether delete targetFile after backup complete, default is OFF
easybackup.deleteTargetFile=OFF
# Receive Backup file mail address
# You can specify more than one, separated by a ;
# Send Mail Account Config
# Send Mail Account
# Send Mail password
easybackup.mail.sender.passowrd=mailpassword
# Send Mail SMTP host
easybackup.mail.sender.host=smtp.163.com
# Send Mail SMTP port; default is 25
easybackup.mail.sender.port=25
# Send Mail Whether use SSL; default is false
easybackup.mail.sender.ssl=false
# Send Mail title
# you can use variable: ${targetFileName}, ${name}, ${type}, ${value}, ${backuptime?datetime}, ${backupConfiguration.XXX}
easybackup.mail.sender.title=Backup ${targetFileName}- EasyBackup
# The send mail content freemarker template in template directory, default is 'mail.tpl'
easybackup.mail.sender.template=mail.tpl
# Auto delete when send email complete ON or OFF, default is OFF
easybackup.mail.deleteBackup=OFF
# Execute Command when backup before or after
# You can specify more than one, separated by a ;
easybackup.cmd.before=
easybackup.cmd.after=
# Execute Interceptor when backup before or after
# You can specify more than one, separated by a ;
easybackup.beforeClass=
easybackup.afterClass=
```
### Backup Service Configuration(You can override the default global configuration)
- **file** File backup service configuration
- **user** Custom backup service configuration
`NAME` custom monitoring service name, each monitored service by a group of the same` NAME` configuration entries.
```properties
######################## Backup Service configuration
easybackup.[file|user].NAME=value
easybackup.[file|user].NAME.enable=ON | OFF
easybackup.[file|user].NAME.cronexpression=0/10 * * * * ?
easybackup.[file|user].NAME.dir=/user/backup/;/user/backup2
easybackup.[file|user].NAME.file=
easybackup.[file|user].NAME.compress=ON | OFF
easybackup.[file|user].NAME.compressType=ZIP | GZIP | TAR
easybackup.[file|user].NAME.compressEncoding=
easybackup.[file|user].NAME.deleteTargetFile=ON | OFF
easybackup.user.NAME.targetFileClass=package.YourTargetFile
easybackup.user.NAME.dirClass=package.YourBackupDir
easybackup.user.NAME.fileClass=package.YourBackupFile
easybackup.user.NAME.backupClass=package.YourBackup
easybackup.[file|user].NAME.cmd.before=/user/backupBefore.sh;/user/backupBefore2.sh
easybackup.[file|user].NAME.cmd.after=/user/backcAfter.sh;/user/backcAfter2.sh
easybackup.[file|user].NAME.beforeClass=package.BackupBefore;package.BackupBefore2
easybackup.[file|user].NAME.afterClass=package.BackupAfter;package.BackupAfter2
easybackup.[file|user][email protected];[email protected]
easybackup.[file|user][email protected]
easybackup.[file|user].NAME.mail.sender.passowrd=sendermail_password
easybackup.[file|user].NAME.mail.sender.host=sendermail_host
easybackup.[file|user].NAME.mail.sender.port=sendermail_port
easybackup.[file|user].NAME.mail.sender.ssl=sendermail_ssh
easybackup.[file|user].NAME.mail.sender.title=sendermail_title
easybackup.[file|user].NAME.mail.sender.template=mail.tpl
easybackup.[file|user].NAME.mail.deleteBackup=ON | OFF
easybackup.[file|user].NAME.senders=package.userSenderClass;package.userSenderClass2
```
### User custom configuration instructions
- `targetFileClass`: Get custom processing class of the target file, need to implement `TargetFile` interface, the default is ` cn.easyproject.easybackup.backup.file.impl.DefaultTargtFile`
- `dirClass`: Get custom backup directory handler class, need to implement `BackupDir` interface, the default is ` cn.easyproject.easybackup.backup.file.impl.DefaultBackupDir`
- `fileClass`: Get custom processing class backup filename, need to implement `BackupFile` interface, the default is `cn.easyproject.easybackup.backup.file.impl.DefaultBackupFile`
- `backupClass`: To complete the backup process to achieve class, need to implement `Badkup` interface, the default is `cn.easyproject.easybackup.backup.impls.FileBackup`
### Variables
- **Configuration backup file name**
The default backup file named `${targetFileName}-yyyyMMddHHmmssS[.zip|tar|tar.gz]`, backup file name `Freemarker` can contain the following variables:
```
${targetFileName}: Target File name
${type}: Backup Type(FILE, USER)
${name}: Backup service NAME
${value}: Backup service value
${backuptime?string("yyyyMMddHHmmssS")}: BackupTime
${backupConfiguration.XXX}: BackupConfiguration Obejct
```
Example:
```properties
easybackup.file=${targetFileName}-${type}-${backuptime?string("yyyyMMddHHmmss")}.bkp
easybackup.[file|user].NAME.file=file-${backuptime?string("yyyyMMddHHmmss")}.bkp
```
- **Mail Title Configuration**
The message title may contain the following `Freemarker` variables:
```
${targetFileName}: Target File name
${backupFileName}: Backup File name
${type}: Backup Type(FILE, USER)
${name}: Backup service NAME
${value}: Backup service value
${backuptime?datetime}: BackupTime
${backupConfiguration.XXX}: BackupConfiguration Obejct
```
Example:
```properties
easybackup.mail.sender.title=Backup ${targetFileName}- EasyBackup
easybackup.[file|user].NAME.sender.title=Backup ${targetFileName}- EasyBackup
```
## Examples of fully configured
```properties
######################## Global Config(Optional)
# Backup ON or OFF, default is ON
easybackup.enable=ON
# Backup trigger Cron-Expressions
easybackup.cronexpression=0 30 * * * ?
# Directory to store the backup file
# You can specify more than one, separated by a ;
easybackup.dir=/user/backup/
# backup file name under 'easybackup.backup.dir' directory
# If not specified, the automatically generated file name is 'targetFileName-yyyyMMddHHmmssS[.zip|tar|tar.gz]'
# you can use variable: ${targetFileName}, ${name}, ${type}, ${value}, ${backuptime}, ${backupConfiguration.XXX}
easybackup.file=
# Whether backup compression, default is OFF
easybackup.compress=OFF
# Compression format: TAR(*.tar), ZIP(*.zip), GZIP(*.tar.gz), default is ZIP
easybackup.compressType=ZIP
# Comprssion encoding
easybackup.compressEncoding=
# Whether delete targetFile after backup complete, default is OFF
easybackup.deleteTargetFile=OFF
# Receive Backup file mail address
# You can specify more than one, separated by a ;
# Send Mail Account Config
# Send Mail Account
# Send Mail password
easybackup.mail.sender.passowrd=mailpassword
# Send Mail SMTP host
easybackup.mail.sender.host=smtp.163.com
# Send Mail SMTP port; default is 25
easybackup.mail.sender.port=25
# Send Mail Whether use SSL; default is false
easybackup.mail.sender.ssl=false
# Send Mail title
# you can use variable: ${targetFileName}, ${name}, ${type}, ${value}, ${backuptime?datetime}, ${backupConfiguration.XXX}
easybackup.mail.sender.title=Backup ${targetFileName}- EasyBackup
# The send mail content freemarker template in template directory, default is 'mail.tpl'
easybackup.mail.sender.template=mail.tpl
# Auto delete when send email complete ON or OFF, default is OFF
easybackup.mail.deleteBackup=OFF
# Execute Command when backup before or after
# You can specify more than one, separated by a ;
easybackup.cmd.before=
easybackup.cmd.after=
# Execute Interceptor when backup before or after
# You can specify more than one, separated by a ;
easybackup.beforeClass=
easybackup.afterClass=
######################## Backup Service Configuration
############ File Backup(can override global config)
## format:
## easybackup.file.NAME=value
## easybackup.file.NAME.enable=ON | OFF
## easybackup.file.NAME.cronexpression=0/10 * * * * ?
## easybackup.file.NAME.dir=/user/backup/;/user/backup2
## easybackup.file.NAME.file=
## easybackup.file.NAME.compress=ON | OFF
## easybackup.file.NAME.compressType=ZIP | GZIP | TAR
## easybackup.file.NAME.compressEncoding=
## easybackup.file.NAME.deleteTargetFile=ON | OFF
## easybackup.file.NAME.cmd.before=/user/backupBefore.sh;/user/backupBefore2.sh
## easybackup.file.NAME.cmd.after=/user/backcAfter.sh;/user/backcAfter2.sh
## easybackup.file.NAME.beforeClass=package.BackupBefore;package.BackupBefore2
## easybackup.file.NAME.afterClass=package.BackupAfter;package.BackupAfter2
## easybackup.file.NAME.mail.sender.passowrd=sendermail_password
## easybackup.file.NAME.mail.sender.host=sendermail_host
## easybackup.file.NAME.mail.sender.port=sendermail_port
## easybackup.file.NAME.mail.sender.ssl=sendermail_ssh
## easybackup.file.NAME.mail.sender.title=sendermail_title
## easybackup.file.NAME.mail.sender.template=mail.tpl
## easybackup.file.NAME.mail.deleteBackup=ON | OFF
## easybackup.file.NAME.senders=package.userSenderClass;package.userSenderClass2
# Example:
easybackup.file.LOG=D:/log
easybackup.file.LOG.enable=ON
easybackup.file.LOG.dir=D:/backup/logfile/;E:/backup/logfile
easybackup.file.LOG.cronexpression=0 30 * * * ?
easybackup.file.LOG.compress=ON
easybackup.file.LOG.compressType=ZIP
############ Port Monitor(can override global config)
## format:
## easybackup.user.NAME=value
## easybackup.user.NAME.enable=ON | OFF
## easybackup.user.NAME.cronexpression=0/10 * * * * ?
## easybackup.user.NAME.dir=/user/backup/;/user/backup2
## easybackup.user.NAME.file=
## easybackup.user.NAME.compress=ON | OFF
## easybackup.user.NAME.compressType=ZIP | GZIP | TAR
## easybackup.user.NAME.compressEncoding=
## easybackup.user.NAME.deleteTargetFile=ON | OFF
## easybackup.user.NAME.targetFileClass=package.YourTargetFile
## easybackup.user.NAME.dirClass=package.YourBackupDir
## easybackup.user.NAME.fileClass=package.YourBackupFile
## easybackup.user.NAME.backupClass=package.YourBackup
## easybackup.user.NAME.cmd.before=/user/backupBefore.sh;/user/backupBefore2.sh
## easybackup.user.NAME.cmd.after=/user/backcAfter.sh;/user/backcAfter2.sh
## easybackup.user.NAME.beforeClass=package.BackupBefore;package.BackupBefore2
## easybackup.user.NAME.afterClass=package.BackupAfter;package.BackupAfter2
## easybackup.user.NAME.mail.sender.passowrd=sendermail_password
## easybackup.user.NAME.mail.sender.host=sendermail_host
## easybackup.user.NAME.mail.sender.port=sendermail_port
## easybackup.user.NAME.mail.sender.ssl=sendermail_ssh
## easybackup.user.NAME.mail.sender.title=sendermail_title
## easybackup.user.NAME.mail.sender.template=mail.tpl
## easybackup.user.NAME.mail.deleteBackup=ON | OFF
## easybackup.user.NAME.senders=package.userSenderClass;package.userSenderClass2
# Example:
easybackup.user.MySQL=mysqldump -uroot -proot demoDB
easybackup.user.MySQL.targetFileClass=cn.easyproject.easybackup.mysql.MySQLTargetFile
easybackup.user.MySQL.dir=D:/backup/;E:/backupdb
# default targetFileName is 'demoDB-yyyyMMddHHmmssS.sql'
# you can use variable: ${targetFileName}, ${name}, ${type}, ${value}, ${backuptime?string("yyyyMMddHHmmssS")}, ${backupConfiguration.XXX}
easybackup.user.MySQL.file= demodb-${backuptime?string("yyyyMMddHHmmss")}-backup.sql
easybackup.user.MySQL.compress=ON
easybackup.user.MySQL.compressType=ZIP
easybackup.user.MySQL.cronexpression=0 0 2 * * ?
```
## Mail template configuration
Easy Backup using `freemarker` mail content rendering technology template, the template must be stored in the directory` template`, `mail.tpl` default template.
![mail.tpl](images/mail.png)
### Custom template configuration
You can modify the template content, or fill in your own e-mail template to send.
```properties
### Global configuration
easybackup.mail.sender.template=yourmail.tpl
### Monitor Service configuration
easybackup.[file|user].NAME.mail.sender.template=yourmail.tpl
```
### Template built-in variables
```
${targetFileName}: Target File name
${backupFileName}: Backup File name
${type}: Backup Type(FILE, USER)
${name}: Backup service NAME
${value}: Backup service value
${backuptime?datetime}: BackupTime
${backupConfiguration.XXX}: BackupConfiguration Obejct
```
## EasBackup Application
**EasBackup Application**(`libs/easybackup_application`) can run as application. Configure your backup service as needed, can be activated.
EasyBackup Application already contains the current official and all plug-ins. If you develop a new plug-in, plug-in content can be added directly to the `easybackup-X.X.X-RELEASE-APPLICATION.jar` in.
### Plugins:
- `easybackup-mysql-plugin-3.2.0-RELEASE.jar`: **MySQL Database backup plugin**
### Steps for usage
1. **Configuration Backup Service**
`easybackup.properties` the reference sample, configure your backup service.
2. **Run EasyBackup**
- **Windows**(Sometimes you must '`Run as Administrator`')
```
Start: startup.bat
Stop: shutdown.bat
```
- **Linux**
```
Start: ./startup.sh
Stop: ./shutdown.sh
```
3. **Optional**
1. **Mail template**
edit '`template/mail.tpl`' to custom your mail content.
2. **Logger**
configuration `log4j.properties` log out.
## EasyBackup Engine Framework
EasyBackup is also a free open source cross-platform Java content backup engine frame (**EasyBackup Engine Framework**)(`libs/easybackup_engine_framework`), to provide a unified and standard core configuration and backup scheduling.
### Steps for usage
1. Maven dependency
```XML
<dependency>
<groupId>cn.easyproject</groupId>
<artifactId>easybackup</artifactId>
<version>3.3.2-RELEASE</version>
</dependency>
```
2. Custom interface
3. Configuration `easybackup.properties`
4. Start
```JAVA
public static void main(String[] args) {
new EasyBackup().start();
}
```
### Custom Interface
EasyBackup provides great flexibility, expandability following interfaces, you can customize your backup content:
- **TargetFile target file source**(`cn.easyproject.easybackup.backup.file.TargetFile`)
**return**: custom `java.io.File` target file
**configuration**: `easybackup.user.NAME.targetFileClass`
**default**: `cn.easyproject.easybackup.backup.file.impl.DefaultTargtFile`
- **BackupDir backup directory**(`cn.easyproject.easybackup.backup.file.BackupDir`)
**return**: custom `java.io.File` storage backup file directory
**configuration**: `easybackup.user.NAME.dirClass`
**default**: `cn.easyproject.easybackup.backup.file.impl.DefaultBackupDir`
- **BackupFile backup file name**(`cn.easyproject.easybackup.backup.file.BackupFile`)
**return**: custom `String` backup file name
**configuration**: `easybackup.user.NAME.fileClass`
**default**: `cn.easyproject.easybackup.backup.file.impl.DefaultBackupFile`
- **Backup backup implement**(`cn.easyproject.easybackup.backup.impls.Backup`)
**return**: According to information passed back up files, custom backup processing implementation, returns whether the backup was successful
**configuration**: `easybackup.user.NAME.backupClass`
**default**: `cn.easyproject.easybackup.backup.impls.FileBackup`
- **BackupBefore before interceptor**(`cn.easyproject.easybackup.backup.interceptor.BackupBefore`)
**return**: Returns whether to continue the backup
**configuration**: `easybackup.user.NAME.beforeClass`
**default**:
- **BackupAfter after interceptor**(`cn.easyproject.easybackup.backup.interceptor.BackupAfter`)
**return**:
**configuration**: `easybackup.user.NAME.afterClass`
**default**:
- **Sender**(`cn.easyproject.easybackup.sender.Sender`)
**return**:
**configuration**: `easybackup.[file|user].NAME.senders`
**default**:
### Custom Properties File and Freemarker Configuration object
To provide more flexibility, EasyBackup permit before starting backup service ** custom Properties File object** ( `easybackup.properties`) and ** mail to send Freemarker Configuration object** (` Configuration`).
```JAVA
// Custom Properties File
EasyBackup.setPropertiesFile(java.io.File propertiesFile);
// Custom mail to send Freemarker Configuration object
MailSender.setFreemarkerConfiguration(freemarker.template.Configuration configuration);
```
Example:
```JAVA
// Custom EasyBackup initialization Parameter
// Custom Properties File
Resource res = new ServletContextResource(sce.getServletContext(), "/easybackup.properties");
try {
// Properties File
EasyBackup.setPropertiesFile(res.getFile());
} catch (IOException e) {
e.printStackTrace();
}
// Custom mail to send Freemarker Configuration object
Configuration cfg= new Configuration(Configuration.VERSION_2_3_23);
cfg.setTemplateExceptionHandler(TemplateExceptionHandler.RETHROW_HANDLER);
cfg.setDefaultEncoding("UTF-8");
cfg.setServletContextForTemplateLoading(sce.getServletContext(), "/template");
// MailSender Configuration
MailSender.setFreemarkerConfiguration(cfg);
```
### Runtime access to information
`cn.easyproject.easybackup.BackupRuntime` providing information backup runtime.
```
# Backup controller
start()
stop()
# Information when started
started: Wheter started
allBackupsOnStartup
runningBackupsOnStartup
errorJobBackupsOnStartup
# Configuration information
getBackupNames(): All configuration names
getBackupsConfigurations(): All configuration objects
getEnableBackupsConfigurations(): All enable(enable=ON) configuration objects
getGlobalBackupsConfiguration(): Global Configuration object
getProperties(): Properties object
getPropertiesFile(): Properties File object
```
## Plugins
- `easybackup-mysql-plugin-3.2.0-RELEASE.jar` MySQL Databasse Backup plugin
## EasyBackup Web Manger
[EasyBackup Web Manger](https://github.com/ushelp/EasyBackup-Web "Goto EasyBackup Web Manger") is a Java Web Manager based on the EasyBackup framework Engine, you can complete the backup configuration, start and stop control.
![EasyBackup web manager](images/dashboard.png)
## End
Email:<[email protected]>
[http://www.easyproject.cn](http://www.easyproject.cn "EasyProject Home")
**Donation/捐助:**
<a href="http://www.easyproject.cn/donation">
<img alt="
支付宝/微信/QQ/云闪付/PayPal 扫码支付" src="http://www.easyproject.cn/thanks/donation.png" title="支付宝/微信/QQ/云闪付/PayPal 扫码支付" height="320" width="320"></img></a>
<div>支付宝/微信/QQ/云闪付/PayPal</div>
<br/>
我们相信,每个人的点滴贡献,都将是推动产生更多、更好免费开源产品的一大步。
**感谢慷慨捐助,以支持服务器运行和鼓励更多社区成员。**
We believe that the contribution of each bit by bit, will be driven to produce more and better free and open source products a big step.
**Thank you donation to support the server running and encourage more community members.**