Plugin Directory

Changeset 1725048


Ignore:
Timestamp:
09/05/2017 04:58:44 PM (8 years ago)
Author:
fnywebit
Message:

updated to the version 1.6

Location:
fny-database-backup/trunk
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • fny-database-backup/trunk/README.txt

    r1695902 r1725048  
    22Contributors: fnywebit, backup database, database backup, migrate,
    33Donate link: http://fny-webit.com/backup-database/
    4 Tags: backup, database backup, site backup, restore, database, migrate, backup files, website, upload, amazon, google drive, dropbox, gdrive, ftp, schedule
     4Tags: backup, migrate, database backup, site backup, restore, database, backup files, website, upload, amazon, google drive, dropbox, gdrive, ftp, schedule
    55Requires at least: 3.8
    66Tested up to: 4.8
    7 Stable tag: 1.5
     7Stable tag: 1.6
    88License: GPLv2 or later
    99License URI: http://www.gnu.org/licenses/gpl-2.0.html
     
    153153
    154154== Changelog ==
     155= 1.6 =
     156* Corrected issue connected with upload.
     157
    155158= 1.5 =
    156159* Corrected issue connected with multiple selection from backup list.
  • fny-database-backup/trunk/com/core/FNYBackupDump.php

    r1695902 r1725048  
    295295                $backup['id'] = '';
    296296                $backup['status'] = '';
    297                 $backup['backup'] = file_exists(FNY_DATABASE_BACKUP_FOLDER_PATH.$entry.'/'.$entry.'.sql')?1:0;
     297                $backup['backup'] = file_exists(FNY_DATABASE_BACKUP_FOLDER_PATH.$entry.'/'.$entry.'.sql.zip')?1:0;
    298298                $backup['log'] = file_exists(FNY_DATABASE_BACKUP_FOLDER_PATH.$entry.'/'.$entry.'.log')?1:0;
    299299                $backup['options'] = '';
     
    337337                $size = '';
    338338                if ($backup['backup']) {
    339                     $size = number_format(filesize(FNY_DATABASE_BACKUP_FOLDER_PATH.$entry.'/'.$entry.'.sql')/1000, 2, '.', '').' KB';
     339                    $size = number_format(filesize(FNY_DATABASE_BACKUP_FOLDER_PATH.$entry.'/'.$entry.'.sql.zip')/1000, 2, '.', '').' KB';
    340340                }
    341341
     
    426426                break;
    427427            case "backup":
    428                 $name .= '.sql';
     428                $name .= '.sql.zip';
    429429                FNYBackupHelper::downloadFile($directory.$name, 'application/zip');
    430430                break;
     
    471471
    472472        $migrateTo = FNYBackupConfig::get("FNY_DATABASE_BACKUP_MIGRATE_TO");
     473        $path = FNY_DATABASE_BACKUP_FOLDER_PATH.$this->dumpFileName.'/'.$this->dumpFileName.'.sql';
    473474        if (FNY_DATABASE_BACKUP_MIGRATION_AVAILABLE && $migrateTo) {
    474475            file_put_contents(FNY_DATABASE_BACKUP_FOLDER_PATH.$this->dumpFileName.'/'.$this->dumpFileName.'.log', "Starting migration process:\n", FILE_APPEND);
     
    476477            $fnyDatabaseMigrate = new FNYMigrate();
    477478
    478             $path = FNY_DATABASE_BACKUP_FOLDER_PATH.$this->dumpFileName.'/'.$this->dumpFileName.'.sql';
    479 
    480479            $fnyDatabaseMigrate->setTo($migrateTo);
    481480            $fnyDatabaseMigrate->setPath($path);
    482 
    483481            $fnyDatabaseMigrate->runMigration();
    484482
    485483            file_put_contents(FNY_DATABASE_BACKUP_FOLDER_PATH.$this->dumpFileName.'/'.$this->dumpFileName.'.log', "End migration process:\n", FILE_APPEND);
    486484        }
     485
     486        $this->compressDatabaseBackup($path);
    487487
    488488        if ($status != FNY_DATABASE_BACKUP_FINISHED_WITH_ERROR) {
     
    491491    }
    492492
     493    private function compressDatabaseBackup($filepath)
     494    {
     495        $z = new ZipArchive();
     496        $z->open($filepath.".zip", ZIPARCHIVE::CREATE);
     497        $z->addFile($filepath);
     498        $z->close();
     499
     500        @unlink($filepath);
     501    }
     502
    493503    private function didFinishUpload($status)
    494504    {
  • fny-database-backup/trunk/com/core/FNYBackupUpload.php

    r1695902 r1725048  
    9393
    9494            $this->writeToLog('Uploading file');
    95             $path = FNY_DATABASE_BACKUP_FOLDER_PATH.$this->backupName.'/'.$this->backupName.'.sql';
     95            $path = FNY_DATABASE_BACKUP_FOLDER_PATH.$this->backupName.'/'.$this->backupName.'.sql.zip';
    9696
    9797            $storageObject->setActiveDirectory($activeDirectory);
  • fny-database-backup/trunk/com/storage/FNYGDrive.php

    r1654525 r1725048  
    422422        }
    423423
    424         $chunkSizeBytes = 1000 * 1000;
     424        $chunkSizeBytes = 1024 * 1024;
    425425
    426426        $mime = 'application/octet-stream';
  • fny-database-backup/trunk/fny-database-backup.php

    r1695902 r1725048  
    22
    33/*
    4 * Plugin name: Backup Database
     4* Plugin name: Backup Database Pro
    55* Plugin URI: http://fny-webit.com/backup-database
    66* Description: FNY Backup Database is the best choice for WordPress based WebSites.
    77* Author: FNY Web-IT
    88* Author URI: http://fny-webit.com
    9 * Version: 1.5
     9* Version: 1.6
    1010* License: GPL-2.0+
    1111* License URI: http://www.gnu.org/licenses/gpl-2.0.txt
Note: See TracChangeset for help on using the changeset viewer.