Current time: 04-20-2024, 06:36 PM Hello There, Guest! (LoginRegister)


Post Reply 
[HowTo]: Backup ausschalten "per Domain" - Neue Version auf Seite 6
Author Message
FISA4 Offline
Member
***

Posts: 668
Joined: Feb 2008
Reputation: 15
Post: #1
Smile [HowTo]: Backup ausschalten "per Domain" - Neue Version auf Seite 6
WICHTIGER HINWEIS !!!
Macht ein Backup folgender Dateien BEVOR Ihr anfangt.

Grundsätzlich wird beim neu anlegen einer Domain das Backup eingeschaltet. Dieses läßt sich dann nachträglich über dieses Änderung ausschalten.

/var/www/ispcp/engine/backup/ispcp-backup-all
/var/www/ispcp/gui/reseller/domain_edit.php
/var/www/ispcp/gui/themes/omega_original/reseller/domain_edit.tmp

in:
/var/www/ispcp/engine/backup/ispcp-backup-all

nach Zeile 245

ändere :
Code:
WHERE
                                t1.domain_status        = 'ok'
                        AND     t1.domain_admin_id      = t2.admin_id

in
Code:
WHERE
                                t1.domain_status        = 'ok'
                        AND     t1.domain_admin_id      = t2.admin_id
                        AND     t1.allowbackup          = '1'

dann noch als root in phpMyAdmin einloggen und in der Tabelle `ispcp`
Code:
ALTER TABLE `domain` ADD `allowbackup` TINYINT( 1 ) NOT NULL DEFAULT '1';
ausführen


Datei: /var/www/ispcp/gui/reseller/domain_edit.php

ca. Zeile 59:
Code:
nach:
'TR_CGI_SUPP' => tr('CGI support'),

füge ein:
Code:
'TR_BACKUP' => tr('Backup'),

ca. Zeile 166:

änder:
Code:
global $cgi_supp, $username;

in:
Code:
global $cgi_supp, $username, $backup;

ca. Zeile 169 - 175

ändere:
Code:
SELECT
            domain_name,
                        domain_ip_id,
                        domain_php,
                        domain_cgi,
                        domain_admin_id
        FROM

in:
Code:
SELECT
            domain_name,
                        domain_ip_id,
                        domain_php,
                        domain_cgi,
                        domain_admin_id,
                        allowbackup
        FROM

ca. Zeile 188:

nach:
Code:
    $cgi_supp = $data['domain_cgi'];

einfügen:
Code:
    $backup = $data['allowbackup'];

ca. Zeile 230:

ändere:
Code:
global $username;

in:
Code:
global $username, $backup;

ca. Zeile 254 - 268

nach:
Code:
if ($cgi_supp === 'yes') {
                $tpl->assign(
                                array(
                                        'CGI_YES' => 'selected="selected"',
                                        'CGI_NO' => '',
                                )
                        );
        } else {
                $tpl->assign(
                                array(
                                        'CGI_YES' => '',
                                        'CGI_NO' => 'selected="selected"',
                                )
                        );
        }

füge ein:
Code:
if ($backup === '1') {
                $tpl->assign(
                                array(
                                        'BACKUP_YES' => 'selected="selected"',
                                        'BACKUP_NO' => '',
                                )
                        );
        } else {
                $tpl->assign(
                                array(
                                        'BACKUP_YES' => '',
                                        'BACKUP_NO' => 'selected="selected"',
                                )
                        );
        }

ca. Zeile 305:

änder:
Code:
global $sub, $als, $mail, $ftp, $sql_db, $sql_user, $traff, $disk, $sql, $domain_ip, $domain_php, $domain_cgi;

in:
Code:
global $sub, $als, $mail, $ftp, $sql_db, $sql_user, $traff, $disk, $sql, $domain_ip, $domain_php, $domain_cgi, $backup;

ca. Zeile 320:

VOR:
Code:
$ed_error = '';

füge ein:
Code:
$backup = $_POST['backup'];

ca. Zeile 448:

VOR:
Code:
// update the sql quotas too
        $query = "SELECT domain_name FROM domain WHERE domain_id=?";
        $rs = exec_query($sql, $query, array($user_id));
        $temp_dmn_name = $rs->fields['domain_name'];

füge ein:
Code:
// Backup Yes / No
           $query = "UPDATE `domain` SET `allowbackup` = '$backup' WHERE `domain_id` = ?";
           $rs = exec_query($sql, $query, array($user_id));


Datei: /var/www/ispcp/gui/theme/omega_original/reseller/domain_edit.tpl

Nach:
Code:
              <tr>
                        <td width="25">&nbsp;</td>
                        <td class="content2" width="193">{TR_CGI_SUPP}</td>
                        <td class="content"><select name="domain_cgi" id="domain_cgi">
                            <option value="yes" {CGI_YES}>{TR_YES}</option>
                            <option value="no" {CGI_NO}>{TR_NO}</option>
                          </select>
                        </td>
                      </tr>

füge ein:
Code:
              <tr>
                        <td width="25">&nbsp;</td>
                        <td class="content2" width="193">{TR_BACKUP}</td>
                        <td class="content"><select name="backup">
                            <option value="1" {BACKUP_YES}>{TR_YES}</option>
                            <option value="0" {BACKUP_NO}>{TR_NO}</option>
                          </select>
                        </td>
                      </tr>

Gruß und viel Spass

FISA4

P.S.: evtl. ist das ja was fürs Dev-Team.
(This post was last modified: 04-18-2009 12:04 AM by FISA4.)
03-16-2009 12:37 PM
Find all posts by this user Quote this message in a reply
Post Reply 


Messages In This Thread
[HowTo]: Backup ausschalten "per Domain" - Neue Version auf Seite 6 - FISA4 - 03-16-2009 12:37 PM

Forum Jump:


User(s) browsing this thread: 1 Guest(s)