protected function backup()
    {
        if (empty($this->tempname)) {
            return true;
        }

        $module = $this->data;

        $module += array(
            'directory' => $this->tempname,
            'module_id' => $this->module_id
        );

        $result = $this->getBackupModule()->backup('module', $module);

        if ($result === true) {
            gplcart_file_delete_recursive($this->tempname);
            return true;
        }

        $this->error = $this->translation->text('Failed to backup module @id', array('@id' => $this->module_id));
        return false;
    }