def run(self):
        if os.path.isdir(self.backup_dir):
            if not os.path.isfile(self.output_file):
                try:
                    backup_base_dir  = os.path.dirname(self.backup_dir)
                    backup_base_name = os.path.basename(self.backup_dir)

                    log_msg   = "Archiving directory: %s" % self.backup_dir
                    cmd_flags = ["-C", backup_base_dir, "-c", "-f", self.output_file, "--remove-files"]

                    if self.do_gzip():
                        log_msg = "Archiving and compressing directory: %s" % self.backup_dir
                        cmd_flags.append("-z")

                    cmd_flags.append(backup_base_name)
                    logging.info(log_msg)
                    self.running  = True
                    self._command = LocalCommand(self.binary, cmd_flags, self.verbose)
                    self.exit_code = self._command.run()
                except Exception, e:
                    return self.result(False, "Failed archiving file: %s!" % self.output_file, e)
                finally:
                    self.running   = False
                    self.stopped   = True
                    self.completed = True
            else:
                return self.result(False, "Output file: %s already exists!" % self.output_file, None)
            return self.result(True, "Archiving successful.", None)