Skip to content

Commit

Permalink
Add export main function
Browse files Browse the repository at this point in the history
Add one-line option in list function
Add Differential backup mode
Add Code Of Conduct
Add man page into command line
Other fix
  • Loading branch information
MatteoGuadrini committed Jan 8, 2019
1 parent 1d8a2d2 commit 9f974f6
Show file tree
Hide file tree
Showing 47 changed files with 1,447 additions and 619 deletions.
Empty file modified .gitignore
100644 → 100755
Empty file.
52 changes: 52 additions & 0 deletions CODE_OF_CONDUCT.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
# Contributor Code of Conduct

As contributors and maintainers of this project, and in the interest of
fostering an open and welcoming community, we pledge to respect all people who
contribute through reporting issues, posting feature requests, updating
documentation, submitting pull requests or patches, and other activities.

We are committed to making participation in this project a harassment-free
experience for everyone, regardless of level of experience, gender, gender
identity and expression, sexual orientation, disability, personal appearance,
body size, race, ethnicity, age, religion, or nationality.

Examples of unacceptable behavior by participants include:

* The use of sexualized language or imagery
* Personal attacks
* Trolling or insulting/derogatory comments
* Public or private harassment
* Publishing other's private information, such as physical or electronic
addresses, without explicit permission
* Other unethical or unprofessional conduct

Project maintainers have the right and responsibility to remove, edit, or
reject comments, commits, code, wiki edits, issues, and other contributions
that are not aligned to this Code of Conduct, or to ban temporarily or
permanently any contributor for other behaviors that they deem inappropriate,
threatening, offensive, or harmful.

By adopting this Code of Conduct, project maintainers commit themselves to
fairly and consistently applying these principles to every aspect of managing
this project. Project maintainers who do not follow or enforce the Code of
Conduct may be permanently removed from the project team.

This Code of Conduct applies both within project spaces and in public spaces
when an individual is representing the project or its community.

Instances of abusive, harassing, or otherwise unacceptable behavior may be
reported by contacting the project maintainers at [email protected]. If
the incident involves a committer, you may report directly to
[email protected] or [email protected].

All complaints will be reviewed and investigated and will result in a
response that is deemed necessary and appropriate to the circumstances.
Maintainers are obligated to maintain confidentiality with regard to the
reporter of an incident.

This Code of Conduct is adapted from the [Contributor Covenant][homepage],
version 1.3.0, available at
[http://contributor-covenant.org/version/1/3/0/][version]

[homepage]: http://contributor-covenant.org
[version]: http://contributor-covenant.org/version/1/3/0/
Empty file modified LICENSE.md
100644 → 100755
Empty file.
8 changes: 4 additions & 4 deletions README.md
100644 → 100755
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,8 @@ This list consists of only a few examples; applications can be endless:
- Configuration for silently backup
- All backup are organized into a catalog
- List single or all backup by the catalog
- Backup single PC, with Full,Incremental and Mirror mode;
- Backup more PCs, with Full,Incremental and Mirror mode (with parallelism algorithm);
- Backup single PC, with Full,Incremental,Differential and Mirror mode;
- Backup more PCs, with Full,Incremental,Differential and Mirror mode (with parallelism algorithm);
- Backup custom folder or predefined data (User,Config,Application,System,Log)
- Restore backup on the same PC
- Restore backup in other PC
Expand Down Expand Up @@ -64,7 +64,7 @@ bb --help
Backup a single PC or server is a everyday task.
But most of the data may not change in the various backups made;
then, in these cases, an incremental backup is needed.
Butterfly Backup natively supports incremental backups, starting from a full.
Butterfly Backup natively supports incremental and differential backups, starting from a full.
In this case, the first backup to be performed on the machine will be as follows:
```bash
bb backup --computer pc1 --destination /nas/mybackup --data User Config --type MacOS --mode Full
Expand Down Expand Up @@ -148,7 +148,7 @@ bb --help

## One more thing
The name butterfly, is born precisely because agent-less; like a butterfly takes the pollen from a flower and brings it elsewhere.
A backup or restore is performed without any iterationresponsibility on the part of the final machine.
A backup or restore is performed without any iteration responsibility on the part of the final machine.
The performances are not altered.
While all the operations of Butterfly Backup are carried out, the impacted machine can continuously work with peace of mind.

Expand Down
Empty file modified _config.yml
100644 → 100755
Empty file.
179 changes: 179 additions & 0 deletions bb.man
Original file line number Diff line number Diff line change
@@ -0,0 +1,179 @@
.\" Manpage for Butterfly Backup.
.\" Contact [email protected] to correct errors or typos.
.TH man 1 "11 Dec 2018" "1.4.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] [--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
--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 RETENTION, -r RETENTION
Number of days 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.

.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
--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.

.B config
[ACTION]

Init configuration:
--new, -n Generate new configuration
--remove, -r Remove exist configuration

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
--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

.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
--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

.SH SEE ALSO
Full documentation is here:
https://butterfly-backup.readthedocs.io/en/latest/
.SH BUGS
No known bugs.
.SH AUTHOR
Matteo Guadrini <[email protected]>
.SH COPYRIGHT
(c) Matteo Guadrini. All rights reserved.
Loading

0 comments on commit 9f974f6

Please sign in to comment.