]> git.sur5r.net Git - bacula/bacula/blob - bacula/src/filed/fd_snapshot.h
baculum: Update AUTHORS file
[bacula/bacula] / bacula / src / filed / fd_snapshot.h
1 /*
2    Bacula(R) - The Network Backup Solution
3
4    Copyright (C) 2000-2015 Kern Sibbald
5
6    The original author of Bacula is Kern Sibbald, with contributions
7    from many others, a complete list can be found in the file AUTHORS.
8
9    You may use this file and others of this release according to the
10    license defined in the LICENSE file, which includes the Affero General
11    Public License, v3.0 ("AGPLv3") and some additional permissions and
12    terms pursuant to its AGPLv3 Section 7.
13
14    This notice must be preserved when any source code is 
15    conveyed and/or propagated.
16
17    Bacula(R) is a registered trademark of Kern Sibbald.
18
19    Written by Eric Bollengier 2015
20 */
21
22 #ifndef FD_SNAPSHOT_H
23 #define FD_SNAPSHOT_H
24
25 /* default snapshot handler */
26 char *snapshot_get_command();
27
28 /* Internal objects */
29 class mtab;                     /* device list */
30 class fs_device;
31
32 class snapshot_manager: public SMARTALLOC
33 {
34 private:
35    JCR  *jcr;
36 public:
37    mtab *mount_list;
38
39    snapshot_manager(JCR *ajcr);
40    virtual ~snapshot_manager();
41
42    /* Quiesce application and take snapshot */
43    bool create_snapshots();
44    
45    /* Cleanup snapshots */
46    bool cleanup_snapshots();
47
48    /* List snapshots */
49    bool list_snapshots(alist *ret);
50
51    /* Scan the fileset for devices and application */
52    bool scan_fileset();
53
54    /* Scan the mtab */
55    bool scan_mtab();
56
57    /* Add a mount point to the mtab list */
58    void add_mount_point(uint32_t dev, const char *device, 
59                         const char *mountpoint, const char *fstype);
60 };
61
62 void close_snapshot_backup_session(JCR *jcr);
63 bool open_snapshot_backup_session(JCR *jcr);
64
65 bool snapshot_convert_path(JCR *jcr, FF_PKT *ff, dlist *filelist, dlistString *node);
66
67 #endif  /* FD_SNAPSHOT_H */