--- a/bin/ftbackup Mon May 02 14:40:54 2011 +0200
+++ b/bin/ftbackup Tue May 03 11:50:06 2011 +0200
@@ -118,19 +118,6 @@
my $ftp;
- if (not "output" ~~ \@opt_debug) {
- $ftp = new FTP(
- $cf{FTP_HOST},
- Passive => $cf{FTP_PASSIVE},
- Debug => "ftp" ~~ \@opt_debug,
- ) or die $@;
- $ftp->login or die $ftp->message;
- $ftp->home($ftp->try(pwd => ()));
- $ftp->try(binary => ());
- $ftp->try(mkpath => $cf{FTP_DIR});
- $ftp->try(cwd => $cf{FTP_DIR});
- }
-
# get_history the situation - we rely on $opt_dumpdates
@devs = get_history(@devs);
@devs = calculate_level($cf{FULL_CYCLE}, @devs);
@@ -173,6 +160,20 @@
exit;
}
+ if (not "output" ~~ \@opt_debug) {
+ $ftp = new FTP(
+ $cf{FTP_HOST},
+ Passive => $cf{FTP_PASSIVE},
+ Debug => "ftp" ~~ \@opt_debug,
+ ) or die $@;
+ $ftp->login or die $ftp->message;
+ $ftp->home($ftp->try(pwd => ()));
+ $ftp->try(binary => ());
+ $ftp->try(mkpath => $cf{FTP_DIR});
+ $ftp->try(cwd => $cf{FTP_DIR});
+ }
+
+
# and now we can start doing something with our filesystems
DEVICE: foreach my $dev (@devs) {
my $dir = $dev->{mountpoint};