Skip to content

Commit 30f21c5

Browse files
authored
Merge pull request #89 from sukria/release/0.7.13
Release/0.7.13
2 parents 507fdd9 + 733f6ee commit 30f21c5

24 files changed

Lines changed: 1106 additions & 84 deletions

ChangeLog

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,19 @@
1+
Backup Manager 0.7.13
2+
[ Matteo Cypriani ]
3+
* Fix for issue #79
4+
Add support for xz compression
5+
* Fix for issue #84
6+
Use .lzma extension for lzma-compressed files
7+
8+
[ Maximiliano Curia ]
9+
* Fix for debian bts #831759
10+
Fix pattern generation
11+
* Migrate from Net::Lite::FTP back to Net::FTP
12+
* Force gzip to ignore the filename and timestamp
13+
14+
[ mr-GreyWolf ]
15+
* Add Russian language file
16+
117
Backup Manager 0.7.12
218
[ Philippe Villiers ]
319
* Fix for issue #35

INSTALL

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -23,10 +23,10 @@ For Apple OSX with Fink:
2323

2424
2) Download Backup-Manager:
2525

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

3131
3) Then "make install", and install the needed packages asked by Fink,
3232
as all the needed packages are not installed with the basic Fink install.

VERSION

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
0.7.12
1+
0.7.13

backup-manager

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@
2626
set -e
2727

2828
RELEASE="true"
29-
VERSION="0.7.12"
29+
VERSION="0.7.13"
3030

3131
#Set prefix for paths
3232
BIN_PREFIX=/usr/bin

backup-manager-upload

Lines changed: 21 additions & 40 deletions
Original file line numberDiff line numberDiff line change
@@ -667,50 +667,31 @@ sub send_files_with_ftp($$$$$)
667667
foreach my $host (@{$ra_hosts}) {
668668

669669
my $ftp;
670-
671-
# The FTP over TLS transfer mode
672-
if ($BM_UPLOAD_FTP_SECURE) {
673-
$ftp = ftptls_connect_to_host ($host);
674-
unless (defined $ftp) {
675-
print_error "Unable to connect to host: $host";
676-
return FALSE;
677-
}
678670

679-
unless (ftptls_login($ftp, $user, $passwd)) {
680-
print_error "Unable to login on ${host} in FTP TLS mode.";
681-
return FALSE;
682-
}
683-
unless (ftptls_cwd($ftp, $repository)) {
684-
print_info "The directory ${repository} does not exist, trying to create it.";
685-
unless (ftptls_mkdir($ftp, $repository)) {
686-
print_error "Unable to create directory ${repository} in FTP TLS mode: " . $ftp->message;
687-
return FALSE;
688-
}
689-
}
690-
print_info "Logged on $host, in $repository (FTP TLS mode)";
691-
}
692-
693-
# The unencrypted FTP transfers
694-
else {
695-
$ftp = ftp_connect_to_host ($host);
696-
unless (defined $ftp) {
697-
print_error "Unable to connect to host: $host";
671+
$ftp = ftp_connect_to_host ($host);
672+
unless (defined $ftp) {
673+
print_error "Unable to connect to host: $host";
674+
return FALSE;
675+
}
676+
if ($BM_UPLOAD_FTP_SECURE) {
677+
unless ($ftp->starttls()) {
678+
print_error "Unable to start TLS connection on host: $host";
698679
return FALSE;
699680
}
681+
}
700682

701-
unless (ftp_login($ftp, $user, $passwd)) {
702-
print_error "Unable to login on ${host} in FTP mode.";
703-
return FALSE;
704-
}
705-
unless (ftp_cwd($ftp, $repository)) {
706-
print_info "The directory ${repository} does not exist, trying to create it.";
707-
unless (ftp_mkdir($ftp, $repository)) {
708-
print_error "Unable to create directory ${repository} in FTP mode: " . $ftp->message;
709-
return FALSE;
710-
}
711-
}
712-
print_info "Logged on $host, in $repository (FTP binary mode)";
713-
}
683+
unless (ftp_login($ftp, $user, $passwd)) {
684+
print_error "Unable to login on ${host} in FTP mode.";
685+
return FALSE;
686+
}
687+
unless (ftp_cwd($ftp, $repository)) {
688+
print_info "The directory ${repository} does not exist, trying to create it.";
689+
unless (ftp_mkdir($ftp, $repository)) {
690+
print_error "Unable to create directory ${repository} in FTP mode: " . $ftp->message;
691+
return FALSE;
692+
}
693+
}
694+
print_info "Logged on $host, in $repository (FTP binary mode)";
714695

715696
# Now that we're connected and logged in, test an upload if needed
716697
if ($g_ftptest) {

backup-manager.conf.tpl

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -114,9 +114,9 @@ export BM_TARBALL_NAMEFORMAT="long"
114114

115115
# Type of archives
116116
# Available types are:
117-
# tar, tar.gz, tar.bz2, tar.lz, dar, zip.
117+
# tar, tar.gz, tar.bz2, tar.xz, tar.lzma, dar, zip.
118118
# Make sure to satisfy the appropriate dependencies
119-
# (bzip2, dar, lzma, ...).
119+
# (bzip2, dar, xz, lzma, ...).
120120
export BM_TARBALL_FILETYPE="tar.gz"
121121

122122
# You can choose to build archives remotely over SSH.

doc/user-guide.sgml

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -485,7 +485,7 @@ Suggested value: <tt>long</tt>.
485485
<sect2 id="BM_TARBALL_FILETYPE"><tt>BM_TARBALL_FILETYPE</tt>
486486

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

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

498498
<p>
499-
For the best compression rate, choose <tt>tar.bz2</tt> or <tt>tar.lz</tt>.
499+
For the best compression rate, choose <tt>tar.bz2</tt> or <tt>tar.xz</tt>.
500500

501501
<p>
502502
Since version 0.7.1, &bmngr; supports <em>dar</em> archives. This archiver
503503
provides some interesting features like the archive slicing.
504504
<p>
505-
Since version 0.7.5, &bmngr; supports <em>lzma</em> archives.
505+
Since version 0.7.5, &bmngr; supports <em>lzma</em> archives.
506506

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

510510
<list>
511511
<item> tar.bz2 : needs "bzip2".
512-
<item> tar.lz : needs "lzma".
512+
<item> tar.xz : needs "xz".
513+
<item> tar.lzma : needs "lzma".
513514
<item> dar : needs "dar".
514515
<item> zip : needs "zip".
515516
</list>

lib/actions.sh

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -184,9 +184,14 @@ function check_filetypes()
184184
error "The BM_TARBALL_FILETYPE conf key is set to \"tar.bz2\" but bzip2 is not installed."
185185
fi
186186
;;
187-
"tar.lz" )
187+
"tar.xz" )
188+
if [[ ! -x "$xz" ]]; then
189+
error "The BM_TARBALL_FILETYPE conf key is set to \"tar.xz\" but xz is not installed."
190+
fi
191+
;;
192+
"tar.lzma" )
188193
if [[ ! -x "$lzma" ]]; then
189-
error "The BM_TARBALL_FILETYPE conf key is set to \"tar.lz\" but lzma is not installed."
194+
error "The BM_TARBALL_FILETYPE conf key is set to \"tar.lzma\" but lzma is not installed."
190195
fi
191196
;;
192197
"dar" )

lib/backup-methods.sh

Lines changed: 23 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -499,7 +499,11 @@ function __get_backup_tarball_remote_command()
499499
__get_flags_tar_blacklist "$target"
500500
command="$tar $blacklist $dumpsymlinks $BM_TARBALL_EXTRA_OPTIONS -p -c -j "$target""
501501
;;
502-
tar.lz)
502+
tar.xz)
503+
__get_flags_tar_blacklist "$target"
504+
command="$tar $blacklist $dumpsymlinks $BM_TARBALL_EXTRA_OPTIONS -p -c --xz "$target""
505+
;;
506+
tar.lzma)
503507
__get_flags_tar_blacklist "$target"
504508
command="$tar $blacklist $dumpsymlinks $BM_TARBALL_EXTRA_OPTIONS -p -c --lzma "$target""
505509
;;
@@ -586,9 +590,16 @@ function __get_backup_tarball_command()
586590
__get_flags_tar_blacklist "$target"
587591
command="$tar $incremental $blacklist $dumpsymlinks $BM_TARBALL_EXTRA_OPTIONS -p -c -j -f"
588592
;;
589-
tar.lz)
593+
tar.xz)
594+
if [[ ! -x $xz ]]; then
595+
error "The archive type \"tar.xz\" depends on the tool \"\$xz\"."
596+
fi
597+
__get_flags_tar_blacklist "$target"
598+
command="$tar $incremental $blacklist $dumpsymlinks $BM_TARBALL_EXTRA_OPTIONS -p -c --xz -f"
599+
;;
600+
tar.lzma)
590601
if [[ ! -x $lzma ]]; then
591-
error "The archive type \"tar.lz\" depends on the tool \"\$lzma\"."
602+
error "The archive type \"tar.lzma\" depends on the tool \"\$lzma\"."
592603
fi
593604
__get_flags_tar_blacklist "$target"
594605
command="$tar $incremental $blacklist $dumpsymlinks $BM_TARBALL_EXTRA_OPTIONS -p -c --lzma -f"
@@ -658,7 +669,8 @@ function build_encrypted_archive
658669
error "The configuration variable \"BM_ENCRYPTION_RECIPIENT\" must be defined."
659670
fi
660671

661-
if [[ "$BM_TARBALL_FILETYPE" = "tar.lz" ]] ||
672+
if [[ "$BM_TARBALL_FILETYPE" = "tar.xz" ]] ||
673+
[[ "$BM_TARBALL_FILETYPE" = "tar.lzma" ]] ||
662674
[[ "$BM_TARBALL_FILETYPE" = "zip" ]] ||
663675
[[ "$BM_TARBALL_FILETYPE" = "dar" ]]; then
664676
error "The encryption is not yet possible with \"\$BM_TARBALL_FILETYPE\" archives."
@@ -711,7 +723,6 @@ function __build_local_archive()
711723
warning "File \$file_to_check already exists, skipping."
712724
debug "rm -f ${bm_pending_incremental_list}.orig"
713725
rm -f "${bm_pending_incremental_list}.orig"
714-
continue
715726
fi
716727
}
717728

@@ -797,7 +808,7 @@ function __make_local_tarball_token
797808
"dar")
798809
__get_flags_dar_incremental "$dir_name"
799810
;;
800-
"tar"|"tar.gz"|"tar.bz2"|"tar.lz")
811+
"tar"|"tar.gz"|"tar.bz2"|"tar.xz"|"tar.lzma")
801812
__get_flags_tar_incremental "$dir_name"
802813
;;
803814
esac
@@ -854,9 +865,11 @@ function backup_method_tarball()
854865
debug "backup_method_tarball ($method)"
855866

856867
info "Using method \"\$method\"."
857-
868+
local oldgzip="$GZIP"
869+
export GZIP="-n"
870+
858871
# build the command line
859-
case $BM_TARBALL_FILETYPE in
872+
case $BM_TARBALL_FILETYPE in
860873
tar|tar.bz2|tar.gz)
861874
dumpsymlinks="$(__get_flags_tar_dump_symlinks)"
862875
;;
@@ -874,9 +887,9 @@ function backup_method_tarball()
874887
else
875888
__make_remote_tarball_archives
876889
fi
877-
890+
GZIP="$oldgzip"
878891
# Handle errors
879-
# since version 0.8, BM's follows up its process even if errors were triggered
892+
# since version 0.8, BM's follows up its process even if errors were triggered
880893
# during the archive generation.
881894
if [[ $nb_err -eq 1 ]]; then
882895
warning "1 error occurred during the tarball generation."

lib/externals.sh

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ zip=$(which zip 2> /dev/null) || true
33
bzip=$(which bzip2 2> /dev/null) || true
44
gzip=$(which gzip 2> /dev/null) || true
55
gpg=$(which gpg 2> /dev/null) || true
6+
xz=$(which xz 2> /dev/null) || true
67
lzma=$(which lzma 2> /dev/null) || true
78
dar=$(which dar 2> /dev/null) || true
89
tar=$(which tar 2> /dev/null) || true

0 commit comments

Comments
 (0)