flydev-fr / duplicator Goto Github PK
View Code? Open in Web Editor NEW🧬 Duplicator for ProcessWire. Duplicate, backup and transfer an entire site from one location to another
🧬 Duplicator for ProcessWire. Duplicate, backup and transfer an entire site from one location to another
The deletion of the oldest backup when reaching the Maximum number of packages-number is only executed when the Remove backup packages older than-deadline is also set, this is not mentioned anywhere and also not desirable. This could easily be fixed by removing || empty($deadline)
from line 202 of FTPClient.php and adding an empty($deadline)
-check around the second half of line 225.
I got the following error message in the php logs:
[23-Mar-2022 15:23:37 Europe/Zurich] PHP Fatal error: Uncaught Error: Call to undefined function ProcessWire\bd() in C:\foo\bar\site\modules\Duplicator\Duplicator.module:622 Stack trace: #0 C:\foo\bar\wire\core\Wire.php(417): ProcessWire\Duplicator->___cronJob(Object(ProcessWire\HookEvent)) #1 C:\foo\bar\wire\core\WireHooks.php(951): ProcessWire\Wire->_callMethod('___cronJob', Array) #2 C:\foo\bar\wire\core\Wire.php(485): ProcessWire\WireHooks->runHooks(Object(ProcessWire\Duplicator), 'cronJob', Array) #3 C:\foo\bar\site\modules\Duplicator\Duplicator.module(289): ProcessWire\Wire->__call('cronJob', Array) #4 C:\foo\bar\wire\core\Modules.php(682): ProcessWire\Duplicator->init() #5 C:\foo\bar\wire\core\Modules.php(1448): ProcessWire\Modules->initModule(Object(ProcessWire\Duplicator), Array) #6 C:\foo\bar\wire\core\Modules.php(1257): ProcessWire\Modules->getModule('Duplicator') #7 C:\foo\bar in C:\foo\bar\site\modules\Duplicator\Duplicator.module on line 622
Simple fix as noted in the error.
Thanks!
Importing to InnoDB databases is really slow, if transactions are not used.
Here you can see, how transaction support is checked and transactions used in PW core: https://github.com/processwire/processwire/blob/dev/wire/core/WireDatabasePDO.php#L311
I'm playing with the latest jquery in the core and there is no .live() event in jQuery 3.4.0, so I used .on() event in duplicator.js line 13.
Fatal Error: Uncaught Error: Call to undefined function disk_total_space() in site/modules/Duplicator/Duplicator.module:1135
With PHP 8.1 when I try to backup to an ftp-server I get:
[FTP] error: cannot connect to <myftpserver.com> on port <21>
Hi @flydev-fr - just had this for the first time. The line in question is: if ($package && $package['zipfile'] !== null) {
Given that buildPackage()
often returns true
or false
, the error makes sense.
Let me know if you need anything else.
Thanks!
When I've "FTP upload" enabled then I'am getting the following error:
[23-Mar-2022 15:44:01 Europe/Zurich] PHP Fatal error: Uncaught Error: Class 'DUP_Logs' not found in C:\foo\bar\site\modules\Duplicator\Classes\FTPClient.php:58 Stack trace: #0 C:\foo\bar\site\modules\Duplicator\Duplicator.module(641): FTPClient->connect() #1 C:\foo\bar\wire\core\Wire.php(417): ProcessWire\Duplicator->___cronJob(Object(ProcessWire\HookEvent)) #2 C:\foo\bar\wire\core\WireHooks.php(951): ProcessWire\Wire->_callMethod('___cronJob', Array) #3 C:\foo\bar\wire\core\Wire.php(485): ProcessWire\WireHooks->runHooks(Object(ProcessWire\Duplicator), 'cronJob', Array) #4 C:\foo\bar\site\modules\Duplicator\Duplicator.module(289): ProcessWire\Wire->__call('cronJob', Array) #5 C:\foo\bar\wire\core\Modules.php(682): ProcessWire\Duplicator->init() #6 C:\foo\bar\wire\core\Modules.php(1448): ProcessWire\Modules->initModule(Object(ProcessWire\Duplicator), Array) #7 C:\dev\Wampserver\www\f2ps.loc in C:\foo\bar\site\modules\Duplicator\Classes\FTPClient.php on line 58 [23-Mar-2022 15:44:01 Europe/Zurich] PHP Warning: Cannot modify header information - headers already sent in C:\foo\bar\wire\core\WireHttp.php on line 1649 [23-Mar-2022 15:44:01 Europe/Zurich] PHP Stack trace: [23-Mar-2022 15:44:01 Europe/Zurich] PHP 1. ProcessWire\WireShutdown->shutdown() C:\foo\bar\wire\core\WireShutdown.php:0 [23-Mar-2022 15:44:01 Europe/Zurich] PHP 2. ProcessWire\WireShutdown->sendFatalHeader() C:\foo\bar\wire\core\WireShutdown.php:581 [23-Mar-2022 15:44:01 Europe/Zurich] PHP 3. ProcessWire\WireHttp->sendStatusHeader() C:\foo\bar\wire\core\WireShutdown.php:405 [23-Mar-2022 15:44:01 Europe/Zurich] PHP 4. ProcessWire\WireHttp->sendHeader() C:\foo\bar\wire\core\WireHttp.php:1671 [23-Mar-2022 15:44:01 Europe/Zurich] PHP 5. header() C:\foo\bar\wire\core\WireHttp.php:1649
@flydev-fr Awesome module!
It would be so awesome if we can backup to an S3 subfolder instead of just the root bucket folder.
Thx
Test needed on php-7.4, php-8.0 and php-8.1 w/ latest pw-dev branch
Hi @flydev-fr - I had to add change
Duplicator/ProcessDuplicator.module
Line 463 in e4ab48f
if ($files && count($files)) {
to avoid an error when first configuring S3 backups (and before the first one was created), otherwise I got a fatal error when going to Setup > Duplicator.
PHP Deprecated: basename(): Passing null to parameter #1 ($path) of type string is deprecated in ...\wwwroot\site\modules\Duplicator\ProcessDuplicator.module:234
processwire forum post ref
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.