All Classes Files Functions Variables Enumerations Enumerator Groups Pages
Backup.idl
Go to the documentation of this file.
1 /**
2  * @file Backup.idl
3  * @brief Set message store and configuration backup recovery.
4  *
5  * @author Dusan Juhas, Frantisek Boranek
6  *
7  * @copyright Copyright © 2017 Kerio Technologies s.r.o.
8  */
9 
10 #import <kerio/web/idl/SharedStructures.idl>
11 #import <AdminStructures.idl> //Directories
12 #import <kerio/web/idl/TimeRanges.idl> //Day
13 
14 module kerio {
15 module jsonapi {
16 module admin {
17 
18 enum LastBackupStatus {
19  backupStatusNone,
20  backupStatusSuccessful,
21  backupStatusFailed
22 };
23 
24 enum BackupType {
25  backupTypeFull,
26  backupTypeDifferential,
27  backupTypeMirror
28 };
29 
30 /** [READ-ONLY] */
31 struct BackupInfo {
32  boolean isCreated; ///< True, if backup was successfully created
33  UtcDateTime created; ///< Time when backup started (always in GTM)
34  kerio::web::ByteValueWithUnits size; ///< Compressed size of a backup
35 };
36 
37 /** [READ-ONLY] */
38 struct BackupStatus {
39  boolean backupInProgress; ///< True, if backup is in progress; otherwise, false
40  long percents; ///< Backup progress in percents (form 0 to 100)
41  LastBackupStatus lastBackupStatus; ///< Status of the last backup run
42 
43  Distance elapsedTime; ///< Time from last started backup
44  Distance remainingTime; ///< Approximated time to end of current backup
45 
46  BackupInfo lastFull; ///< Information about last full backup
47  BackupInfo lastDifferential; ///< Information about last differential backup
48  BackupInfo lastMirror; ///< Information about last mirror backup
49 };
50 
51 struct BackupOptions {
52  Directories paths; ///< Paths to store/archive/backup, this field is used in both, archive and backup, options
53 
54  boolean isEnabled; ///< Enable message store and configuration recovery backup
55  BackupStatus status; ///< Current backup status
56 
57  long splitSizeLimit; ///< Split backup files if size reaches 'splitSizeLimit' (MB)
58  long rotationLimit; ///< Keep at most 'rotationLimit' complete backups
59 
60  string networkDiskUserName; ///< If the backup directory is on the network disk, you may need to specify user name
61  string networkDiskPassword; ///< ... and password
62 
63  string notificationEmailAddress; ///< An email address of person that will be notified when backup is completed or if any problems arise
64 };
65 
67  kerio::web::KId id; ///< [READ-ONLY]
68 
69  boolean isEnabled; ///< True if backup schedule is enabled
70  BackupType type; ///< Backup type
71  kerio::web::Day day; ///< Backup schedule day of week
72  TimeHMS time; ///< Backup schedule start time - days are ignored!
73  string description; ///< description of the backup schedule
74 };
75 
76 typedef sequence<BackupSchedule> BackupScheduleList;
77 
78 
79 /**
80  * Backup
81  */
82 interface Backup {
83  /**
84  * Obtain backup options.
85  *
86  * @param options - current backup options
87  */
88  void get(out BackupOptions options);
89 
90  /**
91  * Obtain list of backup scheduling.
92  *
93  * @param scheduleList
94  * @param query - order by, limits
95  */
96  void getScheduleList(out BackupScheduleList scheduleList, in kerio::web::SearchQuery query);
97 
98  /**
99  * Return current backup status.
100  *
101  * @param status - backup status
102  */
103  void getStatus(out BackupStatus status);
104 
105  /**
106  * Set backup options.
107  *
108  * @param options - backup options
109  */
110  void set(in BackupOptions options);
111 
112  /**
113  * Set all backup schedules.
114  *
115  * @param scheduleList
116  */
117  void setScheduleList(in BackupScheduleList scheduleList);
118 
119  /**
120  * Start backup according to current settings.
121  *
122  * @param backupType - backup type
123  */
124  void start(in BackupType backupType);
125 };
126 
127 }; }; };//end of namespace