flydev

Duplicator: Backup and move sites

Recommended Posts

Yes it’s only for year 1. But a good deal if you’re intending on a paid plan anyway.  😀

  • Like 2

Share this post


Link to post
Share on other sites

I have encountered an issue for Duplicator ver 1.2.9.

I am moving a site from localhost(windows 10) to Amazon Linux. I use RDS, which is a standalone server for database, so the dbHost is not localhost.

The issue happened in the installation process after entering the database data and proceed. There's an error telling config file cannot be found. Then I go to config.php, there are at least 4 places are using old information. They are dbHost, dbName, dbUser, dbPass and httpHosts. I think for some reasons the config.php did not update at all after the installation complete. After I manually update the fields, the site works fine now. This means database import is working fine. I wonder if it is the dbHost matters. It is a long URL ended with xxx.rds.amazonaws.com.

  • Like 3

Share this post


Link to post
Share on other sites

Hi @Karl_T sorry for that and thanks for reporting this issue, I think I have an idea why is happening - checking this afternoon.

  • Like 4
  • Thanks 1

Share this post


Link to post
Share on other sites

Hi

Latest Duplicator does not work here.

It does not include ./wire and other stuff.

Version 1.1.7 works.

Thank you.

  • Thanks 1

Share this post


Link to post
Share on other sites

I am running version 1.2.9 without issues on two sites.

13 minutes ago, theo said:

It does not include ./wire and other stuff.

You might want to double check and re-save your settings. There might have been changes regarding the way the module stores what to include and what not to.

  • Like 2

Share this post


Link to post
Share on other sites

If duplicator fails there is no sweat at all. Simply upload your site folder and database.
I never got it why duplicator has an advantage over manually uploading your site folder and database.
The manual down and upload is compatible with all versions of processwire :)
I also don't see any time saving when using it.

Share this post


Link to post
Share on other sites
43 minutes ago, pwired said:

I never got it why duplicator has an advantage over manually uploading your site folder and database.

It all depends on your workflow. Also, Duplicator is not just about cloning a site but for creating backups. Normally I use it for daily backups and/or for quick backups before "performing sensitive changes", just to be on the safe side...

  • Like 4

Share this post


Link to post
Share on other sites
Quote

It all depends on your workflow. Also, Duplicator is not just about cloning a site but for creating backups. Normally I use it for daily backups and/or for quick backups before "performing sensitive changes", just to be on the safe side...

Maybe I still haven't enough websites on my shoulders to see the use of it, so I should install and evaluate it. What about scripting your cpanel over the web ? Does anyone know if there exists a scripting language for automating cpanel tasks ? I don't mean cronjobs but something like cUrl.

  • Like 2

Share this post


Link to post
Share on other sites
7 minutes ago, pwired said:

What about scripting your cpanel over the web ? Does anyone know if there exists a scripting language for automating cpanel tasks ? I don't mean cronjobs but something like cUrl.

I always insist on having SSH no matter what because BASH is also in my toolset. I either clone a complete site with my own script or just the database. I make admin changes in production (if I'm not sure about the results in advance, then I perform tests in dev first) and after that I use my cloning script to replace the dev database from prod which takes only a few (4-7) seconds to do if one does not have to deal with a huge dbs (which I currently don't). 

https://processwire.com/talk/topic/14837-best-practise-to-implement-changes-in-pw-from-development-to-production/?do=findComment&comment=133726

https://processwire.com/talk/topic/14837-best-practise-to-implement-changes-in-pw-from-development-to-production/?do=findComment&comment=133741

 

 

  • Like 1

Share this post


Link to post
Share on other sites
Quote

   SSH . . .

That makes me thinking about writing your own scripts that drive cPanel SSH Commands.
Maybe with AutoHotKey for windows. That would be a cool way to automate and task schedule
backups, down and uploads.

  • Like 1

Share this post


Link to post
Share on other sites
3 hours ago, szabesz said:

I am running version 1.2.9 without issues on two sites.

You might want to double check and re-save your settings. There might have been changes regarding the way the module stores what to include and what not to.

I have completely uninstalled and deleted it, even checked in the db for the module entry, then downloaded and installed the latest version (1.2.9) and no, it does not work as before.

The wire folder is not included etc.

The package is only 2.11 MB instead of more than 20 MB before.

Thank you.

  • Like 2

Share this post


Link to post
Share on other sites

@szabesz Probably you remember my "special" setup.

I had some problems before 1.1.6 in the area of mod_userdir and this:

 

 

Maybe the current problem is related?

  • Like 2

Share this post


Link to post
Share on other sites

OK, I had a quick look at the source of Duplicator.module

On line 640, there is a "isWritable" check:

if(!$f->isReadable() || !$f->isWritable()) { continue; }

Why does the file to copy have to be writable?

My "wire" folder is not writable by "wwwrun" because it is not necessary, it has to be readable though.

If I remove this check, it works as before.

Thank you.

  • Like 1
  • Thanks 1

Share this post


Link to post
Share on other sites

There is another issue in my case:

The parent folder is included in v 1.2.9.

Probably has to do with mod_userdir.

So it does not work because it is extracting everything to /parentfolder/wire etc.

As the above issue, this was all working in v 1.1.7

  • Like 1

Share this post


Link to post
Share on other sites

Not sure if it's all servers, but I am finding the downloading a package from Setup > Duplicator is resulting in partial downloads. I don't have time to investigate at the moment, but just a heads up in case someone is trusting the download to be complete.

  • Like 2

Share this post


Link to post
Share on other sites
14 minutes ago, adrian said:

Setup > Duplicator is resulting in partial downloads. I don't have time to investigate at the moment, but just a heads up in case someone is trusting the download to be complete.

I guess it depends on the file size of the ZIP file. Big files cannot be downloaded for example if not enough memory is allocated for the process. I always download the ZIP files via FTP which is reliable in my case.

  • Like 1

Share this post


Link to post
Share on other sites
On 5/2/2018 at 10:48 AM, theo said:

Why does the file to copy have to be writable?

My "wire" folder is not writable by "wwwrun" because it is not necessary, it has to be readable though. 

@theo The new function is based on the official WireFileTools::zip() function and I didn't saw this check. Nice catch 👍

 

On 5/2/2018 at 5:19 PM, theo said:

There is another issue in my case:

The parent folder is included in v 1.2.9.

Probably has to do with mod_userdir.

It has not do with the issue I remember. I just checked and its a silly mistake I made while updating the module. Thanks again @theo . It will be fixed in Duplicator-1.2.10

 

On 5/2/2018 at 9:32 PM, adrian said:

Not sure if it's all servers, but I am finding the downloading a package from Setup > Duplicator is resulting in partial downloads. I don't have time to investigate at the moment, but just a heads up in case someone is trusting the download to be complete.

I never ran into into this issue but it look like it can happen. I have a site with 600MB stuff and his database size at 1GB+, I have no timeout building the package or downloading issue. To me, it look like a server settings.

If you can, please send me the server details so I can try to reproduce it.

PS: still didn't found the time to check what is going on GoogleDrive.

 

@szabesz any feedback about Dropbox v2 ? 😃

 

  • Like 4

Share this post


Link to post
Share on other sites
1 hour ago, flydev said:

any feedback about Dropbox v2 ?

I do not have too much extra time these days so I postponed testing it, also because you mentioned possible idrive support and I thought I would wait for that too, I was thinking about testing both "parallel".

  • Like 1

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

  • Recently Browsing   0 members

    No registered users viewing this page.

  • Similar Content

    • 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?

       
    • By John W.
      I just posted a question about moving PW from a resting domain to a production domain, after consideration I figure I would create a new post for a second question I have.
      I noticed the coming feature of client size image resizing. This will be really helpful, as I have some clients on a Satellite connection. I'm telling you, them trying to upload 15MB images, or them getting them straight on batch resizers (or Photoshop) to resize before upload is a real chore. Needless to say, Ryan has been doing an excellent job addressing this.
      My question, is that I have several clients on PW 2.x thru 3.x. Is there a really good guide on steps that I need to take to update the core to take advantage of the features of new releases? Are their perils to look out for?
      Yeah, after developing several sites, I feel a bit silly about asking this one, but, the docs doesn't seem to be clear in a "general" sense of upgrading the core across all versions.
      Thanks everyone for your time and assistance.
    • By suntrop
      Hi all
      I have big troubles with my DB backups and phpMyAdmin. I can't manage to import a backup.
      The phpMyAdmin export settings are left to the defaults. The error message I get:
      #1064 - You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'INSERT INTO `caches` (`name`, `data`, `expires`) VALUES ('ModulesUninstalled.in' at line 11 When I delete the complete 'cache' section there are almost for all tables the same errors. (part of the dump attached)
      I had this problem before and back then (couple months ago) I think I copied almost every table individually. I thought it was specific to that DB. But I can't do a dump/import of any of my PW installations.
      MySQL: 5.6.27
      PHP version: 7.0.11
      phpMyAdmin: 4.5.5.1
      Anybody knows that problem? Or what to do?
      phpMyAdmin SQL Dump.sql
    • By vwatson
      Is it possible to add check boxes in order to select multiple backup files and delete them all at once, rather than having to click each one, then Delete?
      Also it would be helpful to make the Restore process more distinct from Deleting.  I must have inadvertently clicked the wrong button once and restored a backup unintentionally, wiping out a day's work. My mistake of course. I obviously wasn't paying close enough attention.  
    • By Fantomas
      Hi all,
      I'm still new to processwire and now I have to create the first hook.
      I need to modify the page-clone module, so there is a field in pages that has to be empty after cloning the page. How could I start this task?