Skip to content

Commit

Permalink
Merge pull request #89 from sukria/release/0.7.13
Browse files Browse the repository at this point in the history
Release/0.7.13
  • Loading branch information
kissifrot committed Dec 20, 2016
2 parents 507fdd9 + 733f6ee commit 30f21c5
Show file tree
Hide file tree
Showing 24 changed files with 1,106 additions and 84 deletions.
16 changes: 16 additions & 0 deletions ChangeLog
Original file line number Diff line number Diff line change
@@ -1,3 +1,19 @@
Backup Manager 0.7.13
[ Matteo Cypriani ]
* Fix for issue #79
Add support for xz compression
* Fix for issue #84
Use .lzma extension for lzma-compressed files

[ Maximiliano Curia ]
* Fix for debian bts #831759
Fix pattern generation
* Migrate from Net::Lite::FTP back to Net::FTP
* Force gzip to ignore the filename and timestamp

[ mr-GreyWolf ]
* Add Russian language file

Backup Manager 0.7.12
[ Philippe Villiers ]
* Fix for issue #35
Expand Down
6 changes: 3 additions & 3 deletions INSTALL
Original file line number Diff line number Diff line change
Expand Up @@ -23,10 +23,10 @@ For Apple OSX with Fink:

2) Download Backup-Manager:

Olga:~ user$ curl -L https://github.com/sukria/Backup-Manager/zipball/v0.7.12 > ~/Desktop/Backup-manager-0.7.12.zip
Olga:~ user$ curl -L https://github.com/sukria/Backup-Manager/archive/0.7.13.zip > ~/Desktop/Backup-manager-0.7.13.zip
Olga:~ user$ cd ~/Desktop
Olga:Desktop user$ unzip backup-manager-0.7.12.zip
Olga:Desktop user$ cd sukria-Backup-Manager-g3bfd294
Olga:Desktop user$ unzip backup-manager-0.7.13.zip
Olga:Desktop user$ cd Backup-Manager-0.7.13

3) Then "make install", and install the needed packages asked by Fink,
as all the needed packages are not installed with the basic Fink install.
Expand Down
2 changes: 1 addition & 1 deletion VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
0.7.12
0.7.13
2 changes: 1 addition & 1 deletion backup-manager
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
set -e

RELEASE="true"
VERSION="0.7.12"
VERSION="0.7.13"

#Set prefix for paths
BIN_PREFIX=/usr/bin
Expand Down
61 changes: 21 additions & 40 deletions backup-manager-upload
Original file line number Diff line number Diff line change
Expand Up @@ -667,50 +667,31 @@ sub send_files_with_ftp($$$$$)
foreach my $host (@{$ra_hosts}) {

my $ftp;

# The FTP over TLS transfer mode
if ($BM_UPLOAD_FTP_SECURE) {
$ftp = ftptls_connect_to_host ($host);
unless (defined $ftp) {
print_error "Unable to connect to host: $host";
return FALSE;
}

unless (ftptls_login($ftp, $user, $passwd)) {
print_error "Unable to login on ${host} in FTP TLS mode.";
return FALSE;
}
unless (ftptls_cwd($ftp, $repository)) {
print_info "The directory ${repository} does not exist, trying to create it.";
unless (ftptls_mkdir($ftp, $repository)) {
print_error "Unable to create directory ${repository} in FTP TLS mode: " . $ftp->message;
return FALSE;
}
}
print_info "Logged on $host, in $repository (FTP TLS mode)";
}

# The unencrypted FTP transfers
else {
$ftp = ftp_connect_to_host ($host);
unless (defined $ftp) {
print_error "Unable to connect to host: $host";
$ftp = ftp_connect_to_host ($host);
unless (defined $ftp) {
print_error "Unable to connect to host: $host";
return FALSE;
}
if ($BM_UPLOAD_FTP_SECURE) {
unless ($ftp->starttls()) {
print_error "Unable to start TLS connection on host: $host";
return FALSE;
}
}

unless (ftp_login($ftp, $user, $passwd)) {
print_error "Unable to login on ${host} in FTP mode.";
return FALSE;
}
unless (ftp_cwd($ftp, $repository)) {
print_info "The directory ${repository} does not exist, trying to create it.";
unless (ftp_mkdir($ftp, $repository)) {
print_error "Unable to create directory ${repository} in FTP mode: " . $ftp->message;
return FALSE;
}
}
print_info "Logged on $host, in $repository (FTP binary mode)";
}
unless (ftp_login($ftp, $user, $passwd)) {
print_error "Unable to login on ${host} in FTP mode.";
return FALSE;
}
unless (ftp_cwd($ftp, $repository)) {
print_info "The directory ${repository} does not exist, trying to create it.";
unless (ftp_mkdir($ftp, $repository)) {
print_error "Unable to create directory ${repository} in FTP mode: " . $ftp->message;
return FALSE;
}
}
print_info "Logged on $host, in $repository (FTP binary mode)";

# Now that we're connected and logged in, test an upload if needed
if ($g_ftptest) {
Expand Down
4 changes: 2 additions & 2 deletions backup-manager.conf.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -114,9 +114,9 @@ export BM_TARBALL_NAMEFORMAT="long"

# Type of archives
# Available types are:
# tar, tar.gz, tar.bz2, tar.lz, dar, zip.
# tar, tar.gz, tar.bz2, tar.xz, tar.lzma, dar, zip.
# Make sure to satisfy the appropriate dependencies
# (bzip2, dar, lzma, ...).
# (bzip2, dar, xz, lzma, ...).
export BM_TARBALL_FILETYPE="tar.gz"

# You can choose to build archives remotely over SSH.
Expand Down
9 changes: 5 additions & 4 deletions doc/user-guide.sgml
Original file line number Diff line number Diff line change
Expand Up @@ -485,7 +485,7 @@ Suggested value: <tt>long</tt>.
<sect2 id="BM_TARBALL_FILETYPE"><tt>BM_TARBALL_FILETYPE</tt>

<p>
<em>Type: enum(tar, tar.gz, tar.bz2, tar.lz, zip, dar), default: <tt>tar.gz</tt>.</em>
<em>Type: enum(tar, tar.gz, tar.bz2, tar.xz, tar.lzma, zip, dar), default: <tt>tar.gz</tt>.</em>

<p>
Basically, this configuration key defines the filetype of the resulting archive.
Expand All @@ -496,20 +496,21 @@ Note that depending on the filetype you choose, you will have to
make sure you have the corresponding compressor installed.

<p>
For the best compression rate, choose <tt>tar.bz2</tt> or <tt>tar.lz</tt>.
For the best compression rate, choose <tt>tar.bz2</tt> or <tt>tar.xz</tt>.

<p>
Since version 0.7.1, &bmngr; supports <em>dar</em> archives. This archiver
provides some interesting features like the archive slicing.
<p>
Since version 0.7.5, &bmngr; supports <em>lzma</em> archives.
Since version 0.7.5, &bmngr; supports <em>lzma</em> archives.

<p>
Make sure to statisfy dependencies according to the filetype you choose:

<list>
<item> tar.bz2 : needs "bzip2".
<item> tar.lz : needs "lzma".
<item> tar.xz : needs "xz".
<item> tar.lzma : needs "lzma".
<item> dar : needs "dar".
<item> zip : needs "zip".
</list>
Expand Down
9 changes: 7 additions & 2 deletions lib/actions.sh
Original file line number Diff line number Diff line change
Expand Up @@ -184,9 +184,14 @@ function check_filetypes()
error "The BM_TARBALL_FILETYPE conf key is set to \"tar.bz2\" but bzip2 is not installed."
fi
;;
"tar.lz" )
"tar.xz" )
if [[ ! -x "$xz" ]]; then
error "The BM_TARBALL_FILETYPE conf key is set to \"tar.xz\" but xz is not installed."
fi
;;
"tar.lzma" )
if [[ ! -x "$lzma" ]]; then
error "The BM_TARBALL_FILETYPE conf key is set to \"tar.lz\" but lzma is not installed."
error "The BM_TARBALL_FILETYPE conf key is set to \"tar.lzma\" but lzma is not installed."
fi
;;
"dar" )
Expand Down
33 changes: 23 additions & 10 deletions lib/backup-methods.sh
Original file line number Diff line number Diff line change
Expand Up @@ -499,7 +499,11 @@ function __get_backup_tarball_remote_command()
__get_flags_tar_blacklist "$target"
command="$tar $blacklist $dumpsymlinks $BM_TARBALL_EXTRA_OPTIONS -p -c -j "$target""
;;
tar.lz)
tar.xz)
__get_flags_tar_blacklist "$target"
command="$tar $blacklist $dumpsymlinks $BM_TARBALL_EXTRA_OPTIONS -p -c --xz "$target""
;;
tar.lzma)
__get_flags_tar_blacklist "$target"
command="$tar $blacklist $dumpsymlinks $BM_TARBALL_EXTRA_OPTIONS -p -c --lzma "$target""
;;
Expand Down Expand Up @@ -586,9 +590,16 @@ function __get_backup_tarball_command()
__get_flags_tar_blacklist "$target"
command="$tar $incremental $blacklist $dumpsymlinks $BM_TARBALL_EXTRA_OPTIONS -p -c -j -f"
;;
tar.lz)
tar.xz)
if [[ ! -x $xz ]]; then
error "The archive type \"tar.xz\" depends on the tool \"\$xz\"."
fi
__get_flags_tar_blacklist "$target"
command="$tar $incremental $blacklist $dumpsymlinks $BM_TARBALL_EXTRA_OPTIONS -p -c --xz -f"
;;
tar.lzma)
if [[ ! -x $lzma ]]; then
error "The archive type \"tar.lz\" depends on the tool \"\$lzma\"."
error "The archive type \"tar.lzma\" depends on the tool \"\$lzma\"."
fi
__get_flags_tar_blacklist "$target"
command="$tar $incremental $blacklist $dumpsymlinks $BM_TARBALL_EXTRA_OPTIONS -p -c --lzma -f"
Expand Down Expand Up @@ -658,7 +669,8 @@ function build_encrypted_archive
error "The configuration variable \"BM_ENCRYPTION_RECIPIENT\" must be defined."
fi

if [[ "$BM_TARBALL_FILETYPE" = "tar.lz" ]] ||
if [[ "$BM_TARBALL_FILETYPE" = "tar.xz" ]] ||
[[ "$BM_TARBALL_FILETYPE" = "tar.lzma" ]] ||
[[ "$BM_TARBALL_FILETYPE" = "zip" ]] ||
[[ "$BM_TARBALL_FILETYPE" = "dar" ]]; then
error "The encryption is not yet possible with \"\$BM_TARBALL_FILETYPE\" archives."
Expand Down Expand Up @@ -711,7 +723,6 @@ function __build_local_archive()
warning "File \$file_to_check already exists, skipping."
debug "rm -f ${bm_pending_incremental_list}.orig"
rm -f "${bm_pending_incremental_list}.orig"
continue
fi
}

Expand Down Expand Up @@ -797,7 +808,7 @@ function __make_local_tarball_token
"dar")
__get_flags_dar_incremental "$dir_name"
;;
"tar"|"tar.gz"|"tar.bz2"|"tar.lz")
"tar"|"tar.gz"|"tar.bz2"|"tar.xz"|"tar.lzma")
__get_flags_tar_incremental "$dir_name"
;;
esac
Expand Down Expand Up @@ -854,9 +865,11 @@ function backup_method_tarball()
debug "backup_method_tarball ($method)"

info "Using method \"\$method\"."

local oldgzip="$GZIP"
export GZIP="-n"

# build the command line
case $BM_TARBALL_FILETYPE in
case $BM_TARBALL_FILETYPE in
tar|tar.bz2|tar.gz)
dumpsymlinks="$(__get_flags_tar_dump_symlinks)"
;;
Expand All @@ -874,9 +887,9 @@ function backup_method_tarball()
else
__make_remote_tarball_archives
fi

GZIP="$oldgzip"
# Handle errors
# since version 0.8, BM's follows up its process even if errors were triggered
# since version 0.8, BM's follows up its process even if errors were triggered
# during the archive generation.
if [[ $nb_err -eq 1 ]]; then
warning "1 error occurred during the tarball generation."
Expand Down
1 change: 1 addition & 0 deletions lib/externals.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ zip=$(which zip 2> /dev/null) || true
bzip=$(which bzip2 2> /dev/null) || true
gzip=$(which gzip 2> /dev/null) || true
gpg=$(which gpg 2> /dev/null) || true
xz=$(which xz 2> /dev/null) || true
lzma=$(which lzma 2> /dev/null) || true
dar=$(which dar 2> /dev/null) || true
tar=$(which tar 2> /dev/null) || true
Expand Down
2 changes: 1 addition & 1 deletion lib/files.sh
Original file line number Diff line number Diff line change
Expand Up @@ -412,7 +412,7 @@ function purge_duplicate_archives()
error "Unable to get date from file."
fi

file_pattern=$(echo $file_to_create | sed -e "s/$date_of_file/\*/") ||
file_pattern=$(echo $file_to_create | sed -e "s/\\(.*\\)$date_of_file/\\1\*/") ||
error "Unable to find the pattern of the file."

# loop on each archive occurences (eg: archivename-*-filetype)
Expand Down
15 changes: 13 additions & 2 deletions po/backup-manager.pot
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,13 @@ msgstr ""

#: ../lib/actions.sh:193
msgid ""
"The BM_TARBALL_FILETYPE conf key is set to \"tar.lz\" but lzma is not "
"The BM_TARBALL_FILETYPE conf key is set to \"tar.xz\" but xz is not "
"installed."
msgstr ""

#: ../lib/actions.sh:193
msgid ""
"The BM_TARBALL_FILETYPE conf key is set to \"tar.lzma\" but lzma is not "
"installed."
msgstr ""

Expand Down Expand Up @@ -208,7 +214,12 @@ msgstr ""

#: ../lib/backup-methods.sh:576
#, sh-format
msgid "The archive type \"tar.lz\" depends on the tool \"$lzma\"."
msgid "The archive type \"tar.xz\" depends on the tool \"$xz\"."
msgstr ""

#: ../lib/backup-methods.sh:576
#, sh-format
msgid "The archive type \"tar.lzma\" depends on the tool \"$lzma\"."
msgstr ""

#: ../lib/backup-methods.sh:583
Expand Down
9 changes: 7 additions & 2 deletions po/cs.po
Original file line number Diff line number Diff line change
Expand Up @@ -196,8 +196,13 @@ msgstr "Typ archivu \"tar.bz2\" závisí na nástroji \"$bzip\"."

#: ../lib/backup-methods.sh:571
#, sh-format
msgid "The archive type \"tar.lz\" depends on the tool \"$lzma\"."
msgstr "Typ archivu \"tar.lz\" závisí na nástroji \"$lzma\"."
msgid "The archive type \"tar.xz\" depends on the tool \"$xz\"."
msgstr "Typ archivu \"tar.xz\" závisí na nástroji \"$xz\"."

#: ../lib/backup-methods.sh:571
#, sh-format
msgid "The archive type \"tar.lzma\" depends on the tool \"$lzma\"."
msgstr "Typ archivu \"tar.lzma\" závisí na nástroji \"$lzma\"."

#: ../lib/backup-methods.sh:578
#, sh-format
Expand Down
9 changes: 7 additions & 2 deletions po/de.po
Original file line number Diff line number Diff line change
Expand Up @@ -214,8 +214,13 @@ msgstr "Der Archivtyp »tar.bz2« hängt vom Werkzeug »$bzip« ab."

#: ../lib/backup-methods.sh:571
#, sh-format
msgid "The archive type \"tar.lz\" depends on the tool \"$lzma\"."
msgstr "Der Archivtyp »tar.lz« hängt vom Werkzeug »$lzma« ab."
msgid "The archive type \"tar.xz\" depends on the tool \"$xz\"."
msgstr "Der Archivtyp »tar.xz« hängt vom Werkzeug »$xz« ab."

#: ../lib/backup-methods.sh:571
#, sh-format
msgid "The archive type \"tar.lzma\" depends on the tool \"$lzma\"."
msgstr "Der Archivtyp »tar.lzma« hängt vom Werkzeug »$lzma« ab."

#: ../lib/backup-methods.sh:578
#, sh-format
Expand Down
9 changes: 7 additions & 2 deletions po/es.po
Original file line number Diff line number Diff line change
Expand Up @@ -234,8 +234,13 @@ msgstr "El tipo de fichero \"tar.bz2\" depende de la herramienta \"$bzip\"."

#: ../lib/backup-methods.sh:571
#, sh-format
msgid "The archive type \"tar.lz\" depends on the tool \"$lzma\"."
msgstr "El tipo de fichero \"tar.lz\" depende de la herramienta \"$lzma\"."
msgid "The archive type \"tar.xz\" depends on the tool \"$xz\"."
msgstr "El tipo de fichero \"tar.xz\" depende de la herramienta \"$xz\"."

#: ../lib/backup-methods.sh:571
#, sh-format
msgid "The archive type \"tar.lzma\" depends on the tool \"$lzma\"."
msgstr "El tipo de fichero \"tar.lzma\" depende de la herramienta \"$lzma\"."

#: ../lib/backup-methods.sh:578
#, sh-format
Expand Down
17 changes: 13 additions & 4 deletions po/fr.po
Original file line number Diff line number Diff line change
Expand Up @@ -83,8 +83,12 @@ msgid "The BM_TARBALL_FILETYPE conf key is set to \"tar.bz2\" but bzip2 is not i
msgstr "La clef BM_TARBALL_FILETYPE vaut « tar.bz2 » mais bzip2 n'est pas installé."

#: ../lib/actions.sh:193
msgid "The BM_TARBALL_FILETYPE conf key is set to \"tar.lz\" but lzma is not installed."
msgstr "La clef BM_TARBALL_FILETYPE vaut « tar.lz » mais lzma n'est pas installé."
msgid "The BM_TARBALL_FILETYPE conf key is set to \"tar.xz\" but xz is not installed."
msgstr "La clef BM_TARBALL_FILETYPE vaut « tar.xz » mais xz n'est pas installé."

#: ../lib/actions.sh:193
msgid "The BM_TARBALL_FILETYPE conf key is set to \"tar.lzma\" but lzma is not installed."
msgstr "La clef BM_TARBALL_FILETYPE vaut « tar.lzma » mais lzma n'est pas installé."

#: ../lib/actions.sh:198
msgid "The BM_TARBALL_FILETYPE conf key is set to \"dar\" but dar is not installed."
Expand Down Expand Up @@ -197,8 +201,13 @@ msgstr "Le type d'archive « tar.bz2 » dépend de l'outil « $bzip »."

#: ../lib/backup-methods.sh:576
#, sh-format
msgid "The archive type \"tar.lz\" depends on the tool \"$lzma\"."
msgstr "Le type d'archive « tar.lz » dépend de l'outil « $lzma »."
msgid "The archive type \"tar.xz\" depends on the tool \"$xz\"."
msgstr "Le type d'archive « tar.xz » dépend de l'outil « $xz »."

#: ../lib/backup-methods.sh:576
#, sh-format
msgid "The archive type \"tar.lzma\" depends on the tool \"$lzma\"."
msgstr "Le type d'archive « tar.lzma » dépend de l'outil « $lzma »."

#: ../lib/backup-methods.sh:583
#, sh-format
Expand Down
Loading

0 comments on commit 30f21c5

Please sign in to comment.