forked from opennet/FSBackup
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathcfg_example_users
More file actions
268 lines (214 loc) · 8.36 KB
/
cfg_example_users
File metadata and controls
268 lines (214 loc) · 8.36 KB
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
# Example of configuration file.
#
#-------------------
# Name of backup, single word.
#-------------------
$cfg_backup_name = "testhost_users";
#-------------------
# Path of internal cache directory for local backup method.
#-------------------
$cfg_cache_dir = "/usr/local/fsbackup/cache";
#-------------------
# Full path of some external program running from C<fsbackup.pl>.
# $prog_gzip = "" - not use compression, $prog_pgp = "" - not use encryption.
# Paths to the programs to be launched during the backup process.
# It is recommended not to be lazy and write the full path to each program.
# Attention ! When using gpg encryption, it is recommended to
# set $prog_gzip="", because gpg compresses data before encryption.
# Using gzip will result in double compression and unnecessary CPU load.
#-------------------
$prog_md5sum = "/usr/bin/md5sum -b";
$prog_tar = "/bin/tar";
$prog_ssh = "/usr/bin/ssh";
$prog_rm = "/bin/rm";
$prog_gzip = "/usr/bin/gzip"; # If equal to "", then don't use compression.
$prog_pgp = ""; # If equal to "", do not apply encryption.
#-------------------
# Checksum method:
# timesize - checksum of file attributes (default, best speed)
# md5 - checksum of file attributes + MD5 checksum of file content.
# Checksum calculation method for determining changes in a file.
# timesize - takes into account the time of the last modification of the file, its size,
# file attributes, but not the contents. As a rule of thumb
# taking these factors into account is usually enough to determine whether
# to update the file in the backup. The fastest method.
# md5 - all timesize parameters + checksum of contents
# of the file. The most resource-intensive and slowest method.
#-------------------
$cfg_checksum = "timesize";
#-------------------
# Backup style:
# backup - incremental backup (copy only new and changed files).
# full_backup - full backup (copy all files).
# sync - file tree synchronization (only for ssh or local storage type).
# hash - hash creation without storing archive (spying for new or changed files, without physically moving).
#-------------------
$cfg_backup_style = "backup";
#-------------------
# Incremental level (after how many incremental copy make full refresh of backup)
# Number of backup copies, in case of incremental backup, after which a full backup is performed
# Full backup. For example, at = 7 - 6 times only changes will be placed,
# for 7 times the backup will be merged into one file. 0 - as many times as you like.
#-------------------
$cfg_increment_level = 2;
#-------------------
# Save previous backup to OLD directory before rotation or before storing
# full backup.
# 0 - don't save old backup
# 1 - save old backup.
# Saving the previous version of the full backup before incremental rotation or
# Replacing the current non-incremental backup with a new version.
# The old version is placed in the OLD subdirectory.
# 0 - do not save the previous version.
# 1 - keep the previous version
#-------------------
$cfg_save_old_backup = 0;
#-------------------
# Type of backup storage:
# local - store backup on local file system.
# remote_ssh - store backup on remote host over SSH connection.
# remote_ftp - store backup on remote FTP server.
# remote_ftps - store backup on remote FTPS server.
#-------------------
$cfg_type = "remote_ftp";
#-------------------
# Connection parameters for remote_ssh storage type.
# Parameters required to copy the backup via ssh and ftp:
#-------------------
$cfg_remote_host = "backupserver.com";
$cfg_remote_login = "backup_testhost";
$cfg_remote_path = "/backup_users";
#-------------------
# FTP transfer mode. If set to a non-zero value then all data transfers will
# be done using passive mode. This is not usually required except for some dumb
# servers, and some firewall configurations.
# Connection mode with FTP server (passive or active).
# 0 - Active mode.
# 1 - Passive mode (for specific ftp servers or special firewall settings).
#-------------------
$cfg_remote_ftp_mode = 0;
#-------------------
# Password of remote login for remote_ftp storage type.
#-------------------
$cfg_remote_password = "Test1234";
#-------------------
# Path of directory to store backup on local file system for local storage type.
# Parameters required to store the backup on the local FS:
# The backup should not be in the same directory as the cache. Create a separate directory,
# for example, archive.
#-------------------
$cfg_local_path = "/usr/local/fsbackup/archive";
#-------------------
# Limit of file creation time in days.
# If not 0, don't backup files created or modified later then $cfg_time_limit days.
# Time in days, files created before which will not be placed in the backup.
# 0 - put all files regardless of the time of their creation.
#-------------------
$cfg_time_limit = 0;
#-------------------
# Limit of file creation time in days.
# If not 0, don't backup files created or modified later then $cfg_time_limit days.
# Time in days, files created before which will not be placed in the backup.
# 0 - put all files regardless of the time of their creation.
#-------------------
# 10Mb~
$cfg_size_limit = 10000;
#-------------------
# Size of maximum size (in KiloBytes) of single unpacked archive file (volume).
# 0 - unlimited file size.
# The maximum size (in Kb) of an uncompressed backup archive placed in a single
# file, i.e. volume size. Useful when creating gigantic archives that do not fit into the file system's limits
# into file system limitations or when writing archives to small drives.
# If the specified size is exceeded, writing is continued to the next file c
# identifier '-2', '-3', etc.
# 0 - archive size is not limited.
#-------------------
$cfg_maximum_archive_size = 0;
#-------------------
# Root path for initial chdir.
# Root directory relative to which files are placed in the backup
# and relative to which paths for placing files are described.
#-------------------
$cfg_root_path = "/";
#-------------------
# Name of user in public key ring with public key will be used for PGP encryption.
# Not use encryption if not set.
# Encrypt the backup using PGP.
# Otherwise, the field contains the UserId of the record in the public key ring.
#-------------------
$cfg_pgp_userid = "backup";
#-------------------
# Verbose level.
# 0 - Silent mode, suspend all output, except fatal configuration
# errors.
# 1 - Output errors and warnings.
# 2 - Output all the available data.
#-------------------
$cfg_verbose = 2;
#-------------------
# Recursive review of the prohibited directories.
# 0 - Recursively to view all contents of directories marked for
# backup, including contents of directories prohibited by
# '!', '!d' and '=! rules.
# 1 - not use a recursive entrance to directory prohibited for
# backup (speed is increased, reduces flexibility of customization).
#-------------------
$cfg_stopdir_prune=0;
1;
#-------------------
# List of backuped path and regexp mask.
# /dir[/file] - backup file or directory.
# !/dir[/file] - NOT include this file or directory to backup.
# # - ignore this line.
# Mask:
# =~ - regexp mask for include file or directory to backup.
# f~ - regexp file mask for include file to backup.
# d~ - regexp directory mask for include directory to backup.
# =! - regexp mask for NOT include file or directory to backup.
# f! - regexp file mask for NOT include file to backup.
# d! - regexp directory mask for NOT include directory to backup.
#
#
# Backup only takes place within the directories and files described in paths.
# Path negations have a higher priority than paths.
# Masks have a higher priority than paths or path negation,
# "NOT" masks have a higher priority than regular masks:
#
#
# Operation priority:
#
# 1. =!
# 2. f!
# 3. f~
# 4. d!
# 5. =~
# 6. d~
# 7. !
# 8. path
#
# Example:
# /usr/home # Declare /usr/home as an empty path,
# !/usr/home # for masks to work.
# d~public_html
# /var
# d!var/log
# f~netconf\.log.*
#
# only /usr/home/*/public_html will be added to the archive,
# and the files in /var/log/var/log/, except for messages, will not.
# But, /usr/local/home/user/public_html will be added to the
# archive will not be ! To search by masks only, you need to declare:
# /
# !/
# d~public_html
# d~cgi-bin
# d~/etc/
#-------------------
__DATA__
f!\.core$
f!^core$
f!\.o$
f!\.([aA][vV][iI]|[mM][pP][eE]?[gG]|[mM][pP]3)$
/home
/root
/var/mail