-
Notifications
You must be signed in to change notification settings - Fork 9
/
bb.1
212 lines (184 loc) · 8.02 KB
/
bb.1
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
.\" Manpage for Butterfly Backup.
.\" Contact [email protected] to correct errors or typos.
.TH man 1 "Feb 15, 2024" "1.11.0" "bb man page"
.SH NAME
bb \- Butterfly Backup - backup/restore/archive tool , agentless
.SH SYNOPSIS
bb [ACTION] [OPTIONS]
bb [-h] [--verbose] [--log] [--dry-run] [--force] [--version]
{config,backup,restore,archive,list,export} ...
.SH DESCRIPTION
Butterfly Backup is a simple command line wrapper of rsync for complex task, written in python.
.SH OPTIONS
.TP
action:
Valid action
{config,backup,restore,archive,list,export}
Available actions
config Configuration options
backup Backup options
restore Restore options
archive Archive options
list List options
export Export options
.B backup
[ACTION]
--computer HOSTNAME, -c HOSTNAME
Hostname or ip address to backup
--list LIST, -L LIST File list of computers or ip addresses to backup
--destination DESTINATION, -d DESTINATION
Destination path
--mode {full,incremental,differential,mirror}, -m {full,incremental,differential,mirror}
Backup mode
--data {user,config,application,system,log} [{user,config,application,system,log} ...], -D {user,config,application,system,log} [{user,config,application,system,log} ...]
Data of which you want to backup
--custom-data, -D CUSTOMDATA [CUSTOMDATA ...], -C CUSTOMDATA [CUSTOMDATA ...]
Custom path of which you want to backup
--file-data FILEDATA, -F FILEDATA
File with custom path of which you want to backup
--user USER, -u USER Login name used to log into the remote host (being backed up)
--type {unix,windows,macos}, -t {unix,windows,macos}
Type of operating system to backup
--compress, -z Compress data
--retention [DAYS [NUMBER ...]], -r [DAYS [NUMBER ...]]
First argument is days of backup retention. Second
argument is minimum number of backup retention
--parallel PARALLEL, -p PARALLEL
Number of parallel jobs
--timeout TIMEOUT, -T TIMEOUT
I/O timeout in seconds
--skip-error, -e Skip error.
--rsync-path, -R Select a custom rsync path.
--bwlimit, -b Bandwidth limit in KBPS.
--ssh-port, -P Custom ssh port.
--exclude EXCLUDE [EXCLUDE ...], -E EXCLUDE [EXCLUDE ...]
Exclude pattern
--start-from ID, -s ID
The new backup is based on another backup, specified by its ID.
.B list
[ACTION]
--catalog CATALOG, -C CATALOG
Folder where is catalog file
--backup-id ID, -i ID
Backup-id of backup
--archived, -a List only archived backup
--cleaned, -c List only cleaned backup
--computer HOSTNAME, -H HOSTNAME
List only match hostname or ip
--detail ID, -d ID List detail of file and folder of specific backup-id
--oneline, -o One line output
.B restore
[ACTION]
--catalog CATALOG, -C CATALOG
Folder where is catalog file
--backup-id ID, -i ID
Backup-id of backup
--last, -L Last available backup
--user USER, -u USER Login name used to log into the remote host (where
you're restoring)
--computer HOSTNAME, -c HOSTNAME
Hostname or ip address to perform restore
--type {Unix,Windows,MacOS}, -t {Unix,Windows,MacOS}
Type of operating system to perform restore
--timeout TIMEOUT, -T TIMEOUT
I/O timeout in seconds
--mirror, -m Mirror mode
--skip-error, -e Skip error.
--rsync-path, -R Select a custom rsync path.
--bwlimit, -b Bandwidth limit in KBPS.
--ssh-port, -P Custom ssh port.
--exclude EXCLUDE [EXCLUDE ...], -E EXCLUDE [EXCLUDE ...]
Exclude pattern
--files FILES [FILES ...], -f FILES [FILES ...]
Restore only specified files
.B config
[ACTION]
Init configuration:
--new, -n Generate new configuration
--remove, -r Remove exist configuration
--init CATALOG, -i CATALOG
Reset CATALOG file. Specify path of backup folder.
--delete-host CATALOG HOST, -D CATALOG HOST
Delete all entry for a single HOST in CATALOG.
--clean CATALOG, -c CATALOG
Cleans the CATALOG if it is corrupt, setting default values.
--delete-backup, -b Delete specific backup ID from CATALOG.
Deploy configuration:
--deploy DEPLOY_HOST, -d DEPLOY_HOST
Deploy configuration to client: hostname or ip address
--user DEPLOY_USER, -u DEPLOY_USER
User of the remote machine
.B archive
[ACTION]
--catalog CATALOG, -C CATALOG
Folder where is catalog file
--days DAYS, -D DAYS Number of days of archive retention
--destination DESTINATION, -d DESTINATION
Archive destination path
.B export
[ACTION]
--catalog CATALOG, -C CATALOG
Folder where is catalog file
--backup-id ID, -i ID
Backup-id of backup
--all, -A All backup
--destination DESTINATION, -d DESTINATION
Destination path
--mirror, -m Mirror mode
--cut, -c Cut mode. Delete source
--include INCLUDE [INCLUDE ...], -I INCLUDE [INCLUDE ...]
Include pattern
--exclude EXCLUDE [EXCLUDE ...], -E EXCLUDE [EXCLUDE ...]
Exclude pattern
--timeout TIMEOUT, -T TIMEOUT
I/O timeout in seconds
--skip-error, -e Skip error
--rsync-path, -R Select a custom rsync path.
--bwlimit, -b Bandwidth limit in KBPS.
--ssh-port, -P Custom ssh port.
.B optional arguments
[OPTIONS]
-h, --help show help message and exit
--verbose, -v Enable verbosity
--log, -l Create a log
--dry-run, -N Dry run mode
--force, -O Force an action without prompt
--version, -V Print version
.SH EXAMPLES
Show full help:
O_O>$ bb --help
Backup single machine:
O_O>$ bb backup --computer host1 --destination /mnt/backup --data User Config --type MacOS
Backup multiple machine:
O_O>$ > hosts.txt
host1
host2
host3
^D
O_O>$ bb backup --list hosts.txt --destination /mnt/backup --data User Config --type MacOS
List catalog backups:
O_O>$ bb list --catalog /mnt/backup
List backup details:
O_O>$ bb list --catalog /mnt/backup --backup-id dd6de2f2-9a1e-11e8-82b0-005056a664e0
Restore machine with log:
O_O>$ bb restore --catalog /mnt/backup --backup-id dd6de2f2-9a1e-11e8-82b0-005056a664e0 --computer host1 --log
Archive backups older than 3 days:
O_O>$ bb archive --catalog /mnt/backup/ --days 3 --destination /mnt/archive/ --verbose
Create configuration (RSA key):
O_O>$ bb config --new
Deploy configuration to machine:
O_O>$ bb config --deploy host1
Export a backup to another path:
O_O>$ bb export --catalog /mnt/backup/ --backup-id f0f700e8-0435-11e9-9e78-005056a664e0 --destination /mnt/export
Reset backup catalog:
O_O>$ bb config --init /mnt/backup/
.SH SEE ALSO
Full documentation is here:
https://butterfly-backup.readthedocs.io/en/latest/
.SH BUGS
Bug #7: differential backup seems to behave like full backup
If you known, open an issue here: https://github.com/MatteoGuadrini/Butterfly-Backup/issues
.SH AUTHOR
Matteo Guadrini <[email protected]>
.SH COPYRIGHT
(c) Matteo Guadrini. All rights reserved.