Jump to content
flydev

Duplicator: Backup and move sites

Recommended Posts

11 minutes ago, flydev said:

Answering from my mobile.

Good catch ! I will update the module with  your patch, we need now to alert the user that some files are not resdable and thus excluded from the zip. Thanks again @theo!

Yes, it took a while. I had the idea before, but was using "file_exists" which is not enough. The file has to be readable.

It's all fine now. The files were some hidden ".directory" files, which for a reason were not readable for the webserver.

These were blocking the entire zip building process.

Thank you.

  • Like 1

Share this post


Link to post
Share on other sites

There is another little problem. I guess it has to do with mod_userdir.

If you go to the package manager page and delete a package (trashcan), the item will be deleted but you will get redirected to an invalid URL.

Sort of:

/~theo/mysite/~theomysiteprocesswire/setup/duplicator/?action=none

Thank you.

  • Like 1

Share this post


Link to post
Share on other sites

Could you check (inspect) with your browser the data attribute of the "Delete All" button please ?

The result should be something like this :

path.thumb.png.2c267b78d5046735ef19d64a5876892e.png

Share this post


Link to post
Share on other sites
9 hours ago, flydev said:

I just installed a fresh XAMP on a Windows machine for a test and everything worked there. (XAMP and the bitnami PW module)

 

Are you running the last version of Duplicator (1.1.5) ?

When you say briefly, did you mean "instantly" ? if yes,  it can be the problem that @theo encountered which is fixed in the 1.1.5.

Please let me know, thanks you.

I think it is the same problem (I read the rest of the thread). Updating made progress but then I was getting the same error as @theo. I'm a beginner with processwire so I will let you two hash things out and try to update again in a few days. 

  • Like 3

Share this post


Link to post
Share on other sites

@flydev

"Delete All" seems OK, but I was talking about the trashcans.

<button id="deletePackages" class="ui-button ui-widget ui-corner-all ui-state-default" name="deletePackages" value="Delete All" type="button" data-action="http://localhost/~theo/mysite/processwire/setup/duplicator/?action=deleteAll"><span class="ui-button-text"><i class="fa fa-trash"></i> Delete All</span></button>

Trashcan is wrong:

<a href="?action=delete&file=2017-12-07_15-22-42-localhost.package.zip" class="trashTrigger" data-action="http://localhost/~theo/mysite/~theomysiteprocesswire/setup/duplicator/?action=none"><i class="fa fa-trash"></i></a>

 

  • Like 1
  • Thanks 1

Share this post


Link to post
Share on other sites

I read you too fast!  Ok yes I forgot to update this link! :-[

Will fix it in 1.1.6 - Thanks theo !

 

@msavard and did you tried the 1.1.5 if it solve your issue ?

Also a small tip for you in case you're not aware. You can use this module - ProcessWireUpgrade - and update the module you want in one click.

Edited by flydev
tip
  • Like 3

Share this post


Link to post
Share on other sites

Module updated to version 1.1.6, I fixed what we discussed here and included various small fix in ProcessDuplicator and GoogleDrive.

  • Like 4
  • Thanks 1

Share this post


Link to post
Share on other sites
16 minutes ago, flydev said:

Module updated to version 1.1.6

Cool :) Do you have a rough timing estimate for DropBox API v2 support?

  • Like 1

Share this post


Link to post
Share on other sites

I will try to find the time this week @szabesz

Also, if you got 5 minutes and you still have the 1&1 host account, could you test duplicator on it ?  I just built a package successfully on 1&1 :)

  • Like 2
  • Thanks 1

Share this post


Link to post
Share on other sites
8 minutes ago, flydev said:

I just built a package successfully on 1&1

Also cool :)

Luckily I moved the site to a speedy VPS and the 1&1 account is cancelled. Since I prefer DropBox it would be great to be able to use the module for remote backups too.

I have my own shared hosting account but that is a lot better one than 1&1's shoddy service. Anyway, I will test the current version with my account this weekend.

Edited by szabesz
missing words
  • Thanks 1

Share this post


Link to post
Share on other sites
2 hours ago, flydev said:

Module updated to version 1.1.6, I fixed what we discussed here and included various small fix in ProcessDuplicator and GoogleDrive.

Great! Thank you!

  • Like 1

Share this post


Link to post
Share on other sites

@flydev The FTP issue that I was having a few versions back has been resolved with the recent updates. Thanks!

  • Like 1
  • Thanks 1

Share this post


Link to post
Share on other sites

@flydev I've uploaded the "Duplicator-SDKs" folder via FTP into the "Duplicator" folder in the modules directory, but the checkbox for Google Drive (I'm only interested in this SDK, not Amazon's) stays greyed out. Is there something else I should do?

Share this post


Link to post
Share on other sites
1 minute ago, jacmaes said:

I've uploaded the "Duplicator-SDKs" folder via FTP into the "Duplicator" folder

As the readme say, you have to only upload/merge the SDKs folder which reside inside the Duplicator-SDKs folder.

 

After downloading and opening the Duplicator-SDKs ZIP archive, you have this tree :

paths.png.9f9a22641ea03deb30ae958f307e527a.png

  • Like 2

Share this post


Link to post
Share on other sites

Sorry, I should have checked the docs first. I'm getting the following error with Google Drive:

Error: Call to undefined function GuzzleHttp\Handler\curl_reset() (line 78 of /home/mydomain/public_html/site/site/modules/Duplicator/SDKs/google-api-php-client-2.2.0/vendor/guzzlehttp/guzzle/src/Handler/CurlFactory.php)

This site is hosted on a cheap, shared Godaddy account by the way.

Share this post


Link to post
Share on other sites

What is the version of your ProcessWire installation ?  I tested it on 2.8 and 3.x and everything is running fine.

Share this post


Link to post
Share on other sites

The latest dev, 3.085. Maybe curl support is restricted on Goddady, which wouldn't surprise me considering my (awful) experience with them.  I'm trying on another server (VPS). So far I'm not getting this error message.

Share this post


Link to post
Share on other sites

Thanks, yeah it can be the issue. I am googling  just to be sure. Thanks again for your input on this.

 

@jacmaes could you check which version of PHP is installed on the GoDaddy host ? Its almost sure that is a PHP config server error.

Share this post


Link to post
Share on other sites

Goddady's PHP version: 5.4.

Good news: Google Drive works flawlessly on my VPS. This is great, thanks @flydev !

  • Like 1

Share this post


Link to post
Share on other sites

Good ! 

and for the GoDaddy host then, you have to upgrade PHP through CPanel to at least PHP 5.6 and "maybe" it will work :)

I say maybe because as crappy shared host, you will may encounter timeout issue there. If you upgrade your host and test Duplicator on it, let me know if you managed to build a package successfully. Thanks!

  • Like 1

Share this post


Link to post
Share on other sites

What could go wrong, if I tried Duplicator already on two PW installs (both 3.0.81 or thereabouts), both on a Windows machine (local) + remote (*nix), but nothing happens?

I chose the default settings + LazyCron.

Checked the error logs also - nothing.

  • Like 2

Share this post


Link to post
Share on other sites
On 12/9/2017 at 2:18 PM, szabesz said:

Anyway, I will test the current version with my account this weekend.

@flydev Here come my findings:

I installed Duplicator on my shared hosting account and also on a VPS and there are no timeout issues but I have noticed the following:
- Package Manager's Support button is not liked to https://processwire.com/talk/topic/15345-duplicator-backup-and-move-sites/
- Similarly, lots of module developers also link to the support forum thread and the Module Directory page in the modules's More Information block. Currently it links to https://processwire.com which is not too useful
- Package Manager has two buttons: Settings, Support. What about a "Clear Log" button as well? It would clear the Duplicator log file.
- until DropBox support is back once more, you might want to update the first post of this thread where it says "Implemented"

I use the built in cron.php and it works for me.

 

Edited by szabesz
typo
  • Like 2

Share this post


Link to post
Share on other sites

Thanks @szabesz!

- About the links, Its actually updated in the next version

- ProcessDuplicator will have a "clear logs" button and a "downloads logs" button as the logging mechanism has changed a bit in the new version

 

@dragan there is nothing wrong, I just made a mistake. give me two minutes :)

  • Like 3

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


  • Recently Browsing   0 members

    No registered users viewing this page.

  • Similar Content

    • By jaro
      This module (github) does with site/assets/files what Ryan's DatabaseBackups module does with the database:
      Backup site/assets Download ZIP archive Upload ZIP archive Restore site/assets Motivation: This module can be the missing part for projects with content backup responsibility on the client's side: The client will be able to download DB and assets/files snapshots through the backend without filesystem access, thus backing up all content themselves.
      Release state alpha – do not use in production environments.
      Credits for the nice UI go to @ryan – I reused most of it and some other code from the DatabaseBackups module.
    • By David Karich
      ProcessWire InputfieldRepeaterMatrixDuplicate
      Thanks to the great ProModule "RepeaterMatrix" I have the possibility to create complex repeater items. With it I have created a quite powerful page builder. Many different content modules, with many more possible design options. The RepeaterMatrix module supports the cloning of items, but only within the same page. Now I often have the case that very design-intensive pages and items are created. If you want to use a content module on a different page (e.g. in the same design), you have to rebuild each item manually every time.
      This module extends the commercial ProModule "RepeaterMatrix" by the function to duplicate repeater items from one page to another page. The condition is that the target field is the same matrix field from which the item is duplicated. This module is currently understood as proof of concept. There are a few limitations that need to be considered. The intention of the module is that this functionality is integrated into the core of RepeaterMatrix and does not require an extra module.
      Check out the screencast
      What the module can do
      Duplicate a repeater item from one page to another No matter how complex the item is Full support for file and image fields Multilingual support Support of Min and Max settings Live synchronization of clipboard between multiple browser tabs. Copy an item and simply switch the browser tab to the target page and you will immediately see the past button Support of multiple RepeaterMatrix fields on one page Configurable which roles and fields are excluded Duplicated items are automatically pasted to the end of the target field and set to hidden status so that changes are not directly published Automatic clipboard update when other items are picked Automatically removes old clipboard data if it is not pasted within 6 hours Delete clipboard itself by clicking the selected item again Benefit: unbelievably fast workflow and content replication What the module can't do
      Before an item can be duplicated in its current version, the source page must be saved. This means that if you make changes to an item and copy this, the old saved state will be duplicated Dynamic loading is currently not possible. Means no AJAX. When pasting, the target page is saved completely No support for nested repeater items. Currently only first level items can be duplicated. Means a repeater field in a repeater field cannot be duplicated. Workaround: simply duplicate the parent item Dynamic reloading and adding of repeater items cannot be registered. Several interfaces and events from the core are missing. The initialization occurs only once after the page load event Changelog
      1.0.4
      Bug fix: Various bug fixes and improvements in live synchronization Bug fix: Items are no longer inserted when the normal save button is clicked. Only when the past button is explicitly clicked Feature: Support of multiple repeater fields in one page Feature: Support of repeater Min/Max settings Feature: Configurable roles and fields Enhancement: Improved clipboard management Enhancement: Documentation improvement Enhancement: Corrected few typos #1 1.0.3
      Feature: Live synchronization Enhancement: Load the module only in the backend Enhancement: Documentation improvement 1.0.2
      Bug fix: Various bug fixes and improvements in JS functions Enhancement: Documentation improvement Enhancement: Corrected few typos 1.0.1
      Bug fix: Various bug fixes and improvements in the duplication process 1.0.0
      Initial release Support this module
      If this module is useful for you, I am very thankful for your small donation: Donate 5,- Euro (via PayPal – or an amount of your choice. Thank you!)
      Download this module
      > Github: https://github.com/FlipZoomMedia/InputfieldRepeaterMatrixDuplicate
      > PW module directory: – soon –
    • By NorbertH
      Is there a hook to do something right after cloning a page ?
      I want the page to be saved right after cloning it either from the button in the tree or from a lister, because saving the page triggers several calculations that are not triggered by just cloning the page.
       
      Thanks in advance !
    • By John W.
      Question 1
      I recently installed PW 3.0.62 for a new site and also have sites running older version of PW 3.x.
      Can I export the database on an older version of PW 3.x and import it to PW 3.0.62 without any issues?
       
      Question 2
      (This is kind of alternative to the above for long term use - and maybe a better solution...)
      On  the sites I've previously built I have templates (home, basic-page, contact) and fields that I commonly use, such as business_name, phone_1.  The last site I built is running PW 3.0.42.  I was considering cloning this into a local site and running the upgrade module to bring it up to PW 3.0.62. From there on out when I start I new project I could just run the PW upgrade module, copy the folder to the location for the new project and duplicate the database using the new projects name.

      So basically, I'll always keep a "blank slate" site that I can just run the PW upgrade on, then duplicate into a new project. This would cut down on the work and time spent having to re-create these common fields, that I use. From there, I would just add fields, templates, etc, specific for the new website project.

      Is this a sound approach to speed up development?

       
×
×
  • Create New...