Commit e494e4a2 authored by cgagnaire's avatar cgagnaire Committed by Matthieu Kermagoret

temporary backup dir not always backup

Not so proud but necessary... :p
parent 3d926ada
......@@ -728,7 +728,8 @@ sub centralBackup() {
################
# Make archive #
################
`cd $TEMP_DIR && cd .. && $BIN_TAR -czf $BACKUP_DIR/$today-central.tar.gz backup`;
my $dir = basename($TEMP_DIR);
`cd $TEMP_DIR && cd .. && $BIN_TAR -czf $BACKUP_DIR/$today-central.tar.gz $dir`;
if ($? ne 0) {
print STDERR "Unable to make tar of backup\n";
}
......@@ -901,10 +902,11 @@ sub monitoringengineBackup() {
print STDERR "No ssh keys for Centreon Engine\n";
}
##################
# Make archives #
#################
`cd $TEMP_DIR && cd .. && $BIN_TAR -czf $BACKUP_DIR/$today-centreon-engine.tar.gz backup`;
##################
# Make archives #
#################
my $dir = basename($TEMP_DIR);
`cd $TEMP_DIR && cd .. && $BIN_TAR -czf $BACKUP_DIR/$today-centreon-engine.tar.gz $dir`;
if ($? ne 0) {
print STDERR "Unable to make tar of backup\n";
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment