Plugin Directory

Changeset 718922


Ignore:
Timestamp:
05/27/2013 03:12:40 PM (13 years ago)
Author:
6Scan
Message:
  • Improved backup process
  • fixed few bugs for FTP installations
Location:
6scan-backup/trunk
Files:
6 edited

Legend:

Unmodified
Added
Removed
  • 6scan-backup/trunk/6scan.php

    r662741 r718922  
    55Description: 6Scan Backup goes beyond existing backup plugins, easily and automatically creating backups of your site and securely storing them in the cloud.
    66Author: 6Scan
    7 Version: 3.0.2
     7Version: 3.0.4
    88Author URI: http://www.6scan.com
    99*/
  • 6scan-backup/trunk/admin/includes/common.php

    r662741 r718922  
    44    die( 'No direct access allowed' );
    55
    6 define ( 'SIXSCAN_VERSION' ,                            '3.0.2.0' );
     6define ( 'SIXSCAN_VERSION' ,                            '3.0.4.0' );
    77define ( 'SIXSCAN_HTACCESS_VERSION' ,                   '1' );
    88
  • 6scan-backup/trunk/admin/includes/installation.php

    r652989 r718922  
    331331   
    332332    $admin_email = isset( $_REQUEST['email'] ) ? $_REQUEST['email'] : "";
    333     $admin_pass = isset( $_REQUEST['password'] ) ? $_REQUEST['password'] : "";
     333    $admin_pass = isset( $_REQUEST['sixscan_password'] ) ? $_REQUEST['sixscan_password'] : "";
    334334
    335335    /*  If there is partner file, partner_id and partner_key are filled */
     
    414414
    415415    /* request_filesystem_credentials() has to pass $_POST['email'] + $_POST['password'] to the next registration stage */
    416     if ( ( $creds = request_filesystem_credentials( $url , '' , FALSE , FALSE, array( 'email' , 'password' , 'agree' , '_sixscannonce' ) ) ) !== FALSE ){   
     416    if ( ( $creds = request_filesystem_credentials( $url , '' , FALSE , FALSE, array( 'email' , 'sixscan_password' , 'agree' , '_sixscannonce' ) ) ) !== FALSE ){
    417417        if ( ! WP_Filesystem( $creds ) ) {
    418418            /* Current POST data failed, present new form . Error is now "TRUE" */
    419             request_filesystem_credentials( $url , '' , TRUE , FALSE , array( 'email' , 'password' , 'agree' , '_sixscannonce' ) );
     419            request_filesystem_credentials( $url , '' , TRUE , FALSE , array( 'email' , 'sixscan_password' , 'agree' , '_sixscannonce' ) );
    420420        }
    421421        else{           
  • 6scan-backup/trunk/data/regpage/reg.html

    r652989 r718922  
    321321                <span>
    322322                    <label for="password">Password</label>
    323                     <input type="password"  value="" name="password" id="password" placeholder="Password" />
     323                    <input type="password"  value="" name="sixscan_password" id="password" placeholder="Password" />
    324324                </span>
    325325            </p>
  • 6scan-backup/trunk/modules/backup/backup_func.php

    r575933 r718922  
    141141    $tmp_random_seed = date("Y-m-d-H-i-s") . "_" . substr( md5 ( rand( 0, 32000 )) , 0 , 10 ); 
    142142    $temp_file_archived = get_temp_dir() . "files_backup_$tmp_random_seed.tar.gz";
    143     $tmp_backup_dir = "/tmp/6scan_backup_$tmp_random_seed/";
     143    $tmp_backup_dir = "/tmp/6scan_backup_$tmp_random_seed";
    144144
    145145    /*  If a previous file was not deleted from some reason, delete it now */
    146     sixscan_backup_func_delete_previous( SIXSCAN_BACKUP_LAST_FS_NAME , $temp_file_archived );
     146    sixscan_backup_func_delete_previous( SIXSCAN_BACKUP_LAST_FS_NAME , array( $temp_file_archived, $tmp_backup_dir ) );
    147147
    148148    /* Prepare backup directory */ 
    149     $backup_cmd = "mkdir $tmp_backup_dir; cp -r " . ABSPATH . " $tmp_backup_dir";
     149    $backup_cmd = "mkdir $tmp_backup_dir; cp -r " . ABSPATH . " $tmp_backup_dir/";
    150150    ob_start(); passthru( $backup_cmd ); ob_end_clean();
    151151
    152152    /* Linux backup is using tar.gz */     
    153     $backup_cmd = "tar -czf $temp_file_archived $tmp_backup_dir 2>&1";
     153    $backup_cmd = "tar -czf $temp_file_archived $tmp_backup_dir/ 2>&1";
    154154    $ret_val = 0;
    155155
     
    157157    ob_start(); passthru( $backup_cmd , $ret_val ); $tar_output = ob_get_contents(); ob_clean();
    158158
    159     $cleanup_cmd = "rm -rf $tmp_backup_dir 2>&1";
    160     passthru( $cleanup_cmd );
     159    sixscan_backup_func_clear_file( $tmp_backup_dir );
    161160
    162161    /* Check for error that might've occured while running tar. Retval 0 is ok */
     
    224223
    225224    $last_db_backup_name = get_option( $backup_type );
    226     if ( file_exists( $last_db_backup_name ) )
    227         @unlink( $last_db_backup_name );
     225
     226    if ( is_array( $last_db_backup_name) ){
     227        foreach ( $last_db_backup_name  as $one_file ){
     228            sixscan_backup_func_clear_file( $one_file );
     229        }
     230    }
     231    else {
     232        sixscan_backup_func_clear_file( $last_db_backup_name );
     233    }
     234
    228235    update_option( $backup_type , $new_backup_filename );
    229236}
    230237
     238function sixscan_backup_func_clear_file( $fname ){
     239    if ( strlen( $fname ) > 0 ){
     240        $cleanup_cmd = "rm -rf $fname 2>&1";
     241        passthru( $cleanup_cmd );
     242    }
     243}
    231244
    232245/* Backup the db OR just a table */
  • 6scan-backup/trunk/readme.txt

    r662741 r718922  
    11=== 6Scan Backup ===
    22Contributors: 6Scan
    3 Version: 3.0.2
     3Version: 3.0.4
    44Tags: backup, automatic backup, cloud, online, secured, restore, recovery
    55Requires at least: 3.0.0
     
    179179* 6Scan now allows users to access their dashboard of all registered websites. To allow that, newly registered users now have to enter a password (while activating the plugin)
    180180
     181= 3.0.4 =
     182* Improved backup processes
     183
    181184== Upgrade Notice ==
    182185
Note: See TracChangeset for help on using the changeset viewer.