]> git.proxmox.com Git - pmg-docs.git/blob - pmgbackup.adoc
add SSL ceriticate generation doc
[pmg-docs.git] / pmgbackup.adoc
1 [[chapter_pmgbackup]]
2 ifdef::manvolnum[]
3 pmgbackup(1)
4 ============
5 :pmg-toplevel:
6
7 NAME
8 ----
9
10 pmgbackup - Proxmox Mail Gateway Backup and Restore Utility
11
12
13 SYNOPSIS
14 --------
15
16 include::pmgbackup.1-synopsis.adoc[]
17
18 DESCRIPTION
19 -----------
20 endif::manvolnum[]
21 ifndef::manvolnum[]
22 Backup and Restore
23 ==================
24 :pmg-toplevel:
25 endif::manvolnum[]
26
27 ifndef::manvolnum[]
28 image::images/screenshot/pmg-gui-backup.png[]
29 endif::manvolnum[]
30
31 {pmg} includes the ability to backup and restore the
32 configuration. This includes the complete config from `/etc/pmg/`, the
33 mail filter rules and the statistic database.
34
35 NOTE: The backup does not include the network setup, and also no mail
36 data from the postfix queue or the spam or virus quarantine.
37
38 You can create a backup by simply pressing the 'Backup' button on the
39 GUI, or by using the command line interface:
40
41 ----
42 # pmgbackup backup
43 starting backup to: /var/lib/pmg/backup/pmg-backup_2018_01_04_5A4E0436.tgz
44 backup finished
45 ----
46
47 Backups are stored inside directory `/var/lib/pmg/backup/`. It is
48 usually best to mount a remote file system to that directory, so that
49 the resulting backups gets stored remotely.
50
51 You can list the contents of that directory with:
52
53 ----
54 # pmgbackup list
55 ....
56 pmg-backup_2017_11_10_5A05D4B9.tgz 17012
57 pmg-backup_2017_11_13_5A09676A.tgz 16831
58 pmg-backup_2018_01_04_5A4E0436.tgz 21514
59 ----
60
61 Restores are also possible using the GUI or command line, and you can
62 select what parts you want to restore:
63
64 System Configuration::
65
66 Basically the contents of `/etc/pmg/`.
67
68 Rule Database::
69
70 The mail filter rule database.
71
72 Statistic::
73
74 All statistical data.
75
76 For examply, you can selectively restore the mail filter rules from an
77 older backup:
78
79 ----
80 # pmgbackup restore --filename pmg-backup_2018_01_04_5A4E0436.tgz --database
81 starting restore: /var/lib/pmg/backup/pmg-backup_2018_01_04_5A4E0436.tgz
82 config_backup.tar: OK
83 Proxmox_ruledb.sql: OK
84 Proxmox_statdb.sql: OK
85 version.txt: OK
86 Destroy existing rule database
87 Create new database
88 run analyze to speed up database queries
89 Analyzing/Upgrading existing Databases...done
90 restore finished
91 ----
92
93
94
95
96 ifdef::manvolnum[]
97 include::pmg-copyright.adoc[]
98 endif::manvolnum[]
99