diff --git a/CHANGES.md b/CHANGES.md index d97bd0b..6faef4b 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -1,5 +1,17 @@ # Release notes +## 1.10.0 +Jul 1, 2023 +* Add **report_issue** function +* Add **get_bckid** function +* Add **--files** argument in *restore* action +* Add **--delete-backup** argument in *config* action +* Add lowercase support on command line +* Fix **check_rsync** function to include *sshconfig* file +* Fix required to *action* subparser +* Fix check for restore empty folders +* Fix create folder in export action if destination doesn't exists + ## 1.9.0 Jun 7, 2023 * Refactoring _setup.py_ diff --git a/bb.1 b/bb.1 index cd70e40..dd3d8f9 100644 --- a/bb.1 +++ b/bb.1 @@ -1,6 +1,6 @@ .\" Manpage for Butterfly Backup. .\" Contact matteo.guadrini@hotmail.it to correct errors or typos. -.TH man 1 "Jun 20, 2023" "1.9.0" "bb man page" +.TH man 1 "Jul 1, 2023" "1.10.0" "bb man page" .SH NAME bb \- Butterfly Backup - backup/restore/archive tool , agentless .SH SYNOPSIS @@ -32,15 +32,14 @@ action: --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} + --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 {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} + --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 ...]] diff --git a/bb.py b/bb.py index e5d1e50..784d4fc 100755 --- a/bb.py +++ b/bb.py @@ -65,7 +65,7 @@ from utility import print_verbose # region Global Variables -VERSION = "1.9.0" +VERSION = "1.10.0" # endregion diff --git a/docs/build/doctrees/environment.pickle b/docs/build/doctrees/environment.pickle index ba692ea..dcd0b6d 100644 Binary files a/docs/build/doctrees/environment.pickle and b/docs/build/doctrees/environment.pickle differ diff --git a/docs/build/doctrees/index.doctree b/docs/build/doctrees/index.doctree index a1ae458..34d2fc3 100644 Binary files a/docs/build/doctrees/index.doctree and b/docs/build/doctrees/index.doctree differ diff --git a/docs/build/html/_sources/index.rst.txt b/docs/build/html/_sources/index.rst.txt index 5a29b08..a7dced0 100644 --- a/docs/build/html/_sources/index.rst.txt +++ b/docs/build/html/_sources/index.rst.txt @@ -326,57 +326,50 @@ There are two backup modes: single and bulk. Let's see how to go about looking a .. code-block:: console arthur@heartofgold$ bb backup --help - usage: bb backup [-h] [--verbose] [--log] [--dry-run] - (--computer HOSTNAME | --list LIST) --destination DESTINATION - [--mode {Full,Incremental,Differential,Mirror}] - (--data {User,Config,Application,System,Log} [{User,Config,Application,System,Log} ...] | --custom-data CUSTOMDATA [CUSTOMDATA ...]) - [--user USER] --type {Unix,Windows,MacOS} [--compress] - [--retention [DAYS [NUMBER ...]]] [--parallel PARALLEL] - [--timeout TIMEOUT] [--skip-error] [--rsync-path RSYNC] - [--bwlimit BWLIMIT] [--ssh-port PORT] + usage: bb backup [-h] [--verbose] [--log] [--dry-run] (--computer HOSTNAME | --list LIST) --destination DESTINATION [--mode {full,incremental,differential,mirror}] + (--data {user,config,application,system,log} [{user,config,application,system,log} ...] | --custom-data CUSTOMDATA [CUSTOMDATA ...]) [--user USER] --type {unix,windows,macos} + [--compress] [--retention [DAYS [NUMBER ...]]] [--parallel PARALLEL] [--timeout TIMEOUT] [--skip-error] [--rsync-path RSYNC] [--bwlimit BWLIMIT] [--ssh-port PORT] [--exclude EXCLUDE [EXCLUDE ...]] [--start-from ID] - optional arguments: - -h, --help show this help message and exit - --verbose, -v Enable verbosity - --log, -l Create a log - --dry-run, -N Dry run mode - - Backup options: - --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 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 [DAYS [NUMBER ...]], -r [DAYS [NUMBER ...]] - First argument are 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 RSYNC, -R RSYNC - Custom rsync path - --bwlimit BWLIMIT, -b BWLIMIT - Bandwidth limit in KBPS. - --ssh-port PORT, -P PORT - Custom ssh port. - --exclude EXCLUDE [EXCLUDE ...], -E EXCLUDE [EXCLUDE ...] - Exclude pattern - --start-from ID, -s ID - Backup id where start a new backup + options: + -h, --help show this help message and exit + --verbose, -v Enable verbosity + --log, -l Create logs + --dry-run, -N Dry run mode + + Backup options: + --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 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 [DAYS [NUMBER ...]], -r [DAYS [NUMBER ...]] + First argument are 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 RSYNC, -R RSYNC + Custom rsync path + --bwlimit BWLIMIT, -b BWLIMIT + Bandwidth limit in KBPS. + --ssh-port PORT, -P PORT + Custom ssh port. + --exclude EXCLUDE [EXCLUDE ...], -E EXCLUDE [EXCLUDE ...] + Exclude pattern + --start-from ID, -s ID + Backup id where start a new backup @@ -396,21 +389,21 @@ There are two backup modes: single and bulk. Let's see how to go about looking a --destination, -d Select the destination folder (root). --mode, -m Select how rsync perform backup: - * Full: + * **full**: Complete (full) backup. - * Incremental: + * **incremental**: Incremental backup is based on the latest backup (the same files are linked with hard link). A Full backup is executed if this mode fails to find one. - * Differential: + * **differential**: Incremental backup is based on the latest Full backup (the same files are linked with hard link). A Full backup is executed if this mode fails to find one. - * Mirror: + * **mirror**: Complete mirror backup. If a file in the source no longer exists, BB deletes it from the destination. --data, -D Select the type of data to put under backup: The values change depending on the type of operating system: - * **User** -> folder containing the home. - * **Config** -> folder containing the configurations of the machine. + * **user** -> folder containing the home. + * **config** -> folder containing the configurations of the machine. * **Log** -> folder containing the log. * **Application** -> folder containing applications. * **System** -> the entire system starting from the root. @@ -418,9 +411,9 @@ There are two backup modes: single and bulk. Let's see how to go about looking a --user, -u Login name used to log into the remote host (being backed up) --type, -t Type of operating system to put under backup: - * **Unix** -> All UNIX os (Linux, BSD, Solaris). - * **Windows** -> Windows Vista or higher with cygwin installed. - * **MacOS** -> MacOSX 10.8 or higher. + * **unix** -> All UNIX os (Linux, BSD, Solaris). + * **windows** -> Windows Vista or higher with cygwin installed. + * **macos** -> MacOSX 10.8 or higher. --compress, -z Compresses the data transmitted. --retention, -r Number of days for which you want to keep your backups and minimum number of backup retention (optional). diff --git a/docs/build/html/index.html b/docs/build/html/index.html index bf4d0c7..3c11fc4 100644 --- a/docs/build/html/index.html +++ b/docs/build/html/index.html @@ -401,57 +401,50 @@

Cygwin on Windows

Backup

There are two backup modes: single and bulk. Let’s see how to go about looking at the help:

arthur@heartofgold$ bb backup --help
-usage: bb backup [-h] [--verbose] [--log] [--dry-run]
-                 (--computer HOSTNAME | --list LIST) --destination DESTINATION
-                 [--mode {Full,Incremental,Differential,Mirror}]
-                 (--data {User,Config,Application,System,Log} [{User,Config,Application,System,Log} ...] | --custom-data CUSTOMDATA [CUSTOMDATA ...])
-                 [--user USER] --type {Unix,Windows,MacOS} [--compress]
-                 [--retention [DAYS [NUMBER ...]]] [--parallel PARALLEL]
-                 [--timeout TIMEOUT] [--skip-error] [--rsync-path RSYNC]
-                 [--bwlimit BWLIMIT] [--ssh-port PORT]
+usage: bb backup [-h] [--verbose] [--log] [--dry-run] (--computer HOSTNAME | --list LIST) --destination DESTINATION [--mode {full,incremental,differential,mirror}]
+                 (--data {user,config,application,system,log} [{user,config,application,system,log} ...] | --custom-data CUSTOMDATA [CUSTOMDATA ...]) [--user USER] --type {unix,windows,macos}
+                 [--compress] [--retention [DAYS [NUMBER ...]]] [--parallel PARALLEL] [--timeout TIMEOUT] [--skip-error] [--rsync-path RSYNC] [--bwlimit BWLIMIT] [--ssh-port PORT]
                  [--exclude EXCLUDE [EXCLUDE ...]] [--start-from ID]
 
-optional arguments:
-  -h, --help            show this help message and exit
-  --verbose, -v         Enable verbosity
-  --log, -l             Create a log
-  --dry-run, -N         Dry run mode
+options:
+   -h, --help            show this help message and exit
+   --verbose, -v         Enable verbosity
+   --log, -l             Create logs
+   --dry-run, -N         Dry run mode
 
-Backup options:
-  --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 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 [DAYS [NUMBER ...]], -r [DAYS [NUMBER ...]]
-                        First argument are 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 RSYNC, -R RSYNC
-                        Custom rsync path
-  --bwlimit BWLIMIT, -b BWLIMIT
-                        Bandwidth limit in KBPS.
-  --ssh-port PORT, -P PORT
-                        Custom ssh port.
-  --exclude EXCLUDE [EXCLUDE ...], -E EXCLUDE [EXCLUDE ...]
-                        Exclude pattern
-  --start-from ID, -s ID
-                        Backup id where start a new backup
+   Backup options:
+   --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 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 [DAYS [NUMBER ...]], -r [DAYS [NUMBER ...]]
+                         First argument are 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 RSYNC, -R RSYNC
+                         Custom rsync path
+   --bwlimit BWLIMIT, -b BWLIMIT
+                         Bandwidth limit in KBPS.
+   --ssh-port PORT, -P PORT
+                         Custom ssh port.
+   --exclude EXCLUDE [EXCLUDE ...], -E EXCLUDE [EXCLUDE ...]
+                         Exclude pattern
+   --start-from ID, -s ID
+                         Backup id where start a new backup