changed archivname for backups.

git-svn-id: svn://svn.code.sf.net/p/fhem/code/trunk@1581 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
mfr69bs
2012-05-24 09:17:03 +00:00
parent a785d0bf69
commit 956a293755

View File

@@ -441,15 +441,16 @@ CreateBackup($)
$backuppaths .= " $conf";
my $dateTime = TimeNow();
$dateTime =~ s/ /_/g;
$dateTime =~ s/(:|-)//g;
# prevents tar's output of "Removing leading /" and return total bytes of archive
$ret = `(mkdir -p $backupdir && tar -C $modpath -cf - $backuppaths | gzip > $backupdir/FHEM.$dateTime.tar.gz) 2>&1`;
$ret = `(mkdir -p $backupdir && tar -C $modpath -cf - $backuppaths | gzip > $backupdir/FHEM-$dateTime.tar.gz) 2>&1`;
unlink("$modpath/$conf");
if($ret) {
chomp $ret;
return $ret;
}
my $size = -s "$backupdir/FHEM.$dateTime.tar.gz";
return "backup done: FHEM.$dateTime.tar.gz ($size Bytes)";
my $size = -s "$backupdir/FHEM-$dateTime.tar.gz";
return "backup done: FHEM-$dateTime.tar.gz ($size Bytes)";
}
sub