Changeset 1725048
- Timestamp:
- 09/05/2017 04:58:44 PM (8 years ago)
- Location:
- fny-database-backup/trunk
- Files:
-
- 5 edited
-
README.txt (modified) (2 diffs)
-
com/core/FNYBackupDump.php (modified) (6 diffs)
-
com/core/FNYBackupUpload.php (modified) (1 diff)
-
com/storage/FNYGDrive.php (modified) (1 diff)
-
fny-database-backup.php (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
fny-database-backup/trunk/README.txt
r1695902 r1725048 2 2 Contributors: fnywebit, backup database, database backup, migrate, 3 3 Donate 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, schedule4 Tags: backup, migrate, database backup, site backup, restore, database, backup files, website, upload, amazon, google drive, dropbox, gdrive, ftp, schedule 5 5 Requires at least: 3.8 6 6 Tested up to: 4.8 7 Stable tag: 1. 57 Stable tag: 1.6 8 8 License: GPLv2 or later 9 9 License URI: http://www.gnu.org/licenses/gpl-2.0.html … … 153 153 154 154 == Changelog == 155 = 1.6 = 156 * Corrected issue connected with upload. 157 155 158 = 1.5 = 156 159 * Corrected issue connected with multiple selection from backup list. -
fny-database-backup/trunk/com/core/FNYBackupDump.php
r1695902 r1725048 295 295 $backup['id'] = ''; 296 296 $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; 298 298 $backup['log'] = file_exists(FNY_DATABASE_BACKUP_FOLDER_PATH.$entry.'/'.$entry.'.log')?1:0; 299 299 $backup['options'] = ''; … … 337 337 $size = ''; 338 338 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'; 340 340 } 341 341 … … 426 426 break; 427 427 case "backup": 428 $name .= '.sql ';428 $name .= '.sql.zip'; 429 429 FNYBackupHelper::downloadFile($directory.$name, 'application/zip'); 430 430 break; … … 471 471 472 472 $migrateTo = FNYBackupConfig::get("FNY_DATABASE_BACKUP_MIGRATE_TO"); 473 $path = FNY_DATABASE_BACKUP_FOLDER_PATH.$this->dumpFileName.'/'.$this->dumpFileName.'.sql'; 473 474 if (FNY_DATABASE_BACKUP_MIGRATION_AVAILABLE && $migrateTo) { 474 475 file_put_contents(FNY_DATABASE_BACKUP_FOLDER_PATH.$this->dumpFileName.'/'.$this->dumpFileName.'.log', "Starting migration process:\n", FILE_APPEND); … … 476 477 $fnyDatabaseMigrate = new FNYMigrate(); 477 478 478 $path = FNY_DATABASE_BACKUP_FOLDER_PATH.$this->dumpFileName.'/'.$this->dumpFileName.'.sql';479 480 479 $fnyDatabaseMigrate->setTo($migrateTo); 481 480 $fnyDatabaseMigrate->setPath($path); 482 483 481 $fnyDatabaseMigrate->runMigration(); 484 482 485 483 file_put_contents(FNY_DATABASE_BACKUP_FOLDER_PATH.$this->dumpFileName.'/'.$this->dumpFileName.'.log', "End migration process:\n", FILE_APPEND); 486 484 } 485 486 $this->compressDatabaseBackup($path); 487 487 488 488 if ($status != FNY_DATABASE_BACKUP_FINISHED_WITH_ERROR) { … … 491 491 } 492 492 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 493 503 private function didFinishUpload($status) 494 504 { -
fny-database-backup/trunk/com/core/FNYBackupUpload.php
r1695902 r1725048 93 93 94 94 $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'; 96 96 97 97 $storageObject->setActiveDirectory($activeDirectory); -
fny-database-backup/trunk/com/storage/FNYGDrive.php
r1654525 r1725048 422 422 } 423 423 424 $chunkSizeBytes = 10 00 * 1000;424 $chunkSizeBytes = 1024 * 1024; 425 425 426 426 $mime = 'application/octet-stream'; -
fny-database-backup/trunk/fny-database-backup.php
r1695902 r1725048 2 2 3 3 /* 4 * Plugin name: Backup Database 4 * Plugin name: Backup Database Pro 5 5 * Plugin URI: http://fny-webit.com/backup-database 6 6 * Description: FNY Backup Database is the best choice for WordPress based WebSites. 7 7 * Author: FNY Web-IT 8 8 * Author URI: http://fny-webit.com 9 * Version: 1. 59 * Version: 1.6 10 10 * License: GPL-2.0+ 11 11 * License URI: http://www.gnu.org/licenses/gpl-2.0.txt
Note: See TracChangeset
for help on using the changeset viewer.