flydev

Duplicator: Backup and move sites

Recommended Posts

This might be a bit off topic, but this problem has come up a few times. Maybe the modules directory could proxy downloads of modules and add the vendor folder on demand (to the module itself) if a composer.json is present. So users can choose if they do a composer install some/module or install it via the backend – without the benefits of a global dependency management tool in the latter case.

  • Like 4

Share this post


Link to post
Share on other sites

How to create a GoogleDrive service account step-by-step

Edited the 2017-02-18

 

Go to https://console.developers.google.com

 

  • Create a new project:

step1.PNG

step2.PNG

 

  • Enable the API:
     

step3.PNG

step4.PNG

step5.PNG

 

  • Create credentials:


step6.PNG

 

  • Select "New service account"

step7.PNG

step8.PNG

 

  • Click on Create and save the JSON key file
  • Click on Manage service accounts :

step9.PNG

 

  • Copy the service account ID :

step10.PNG

 

  • Configure Duplicator by copy/pasting the service account's email and the content of the JSON key file :

step11.PNG

 

  • Like 4

Share this post


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

@flydev Take a look at https://github.com/jubos/fake-s3 and https://github.com/jserver/mock-s3

I have not used them.

It is mainly to test different servers configuration as currently the AmazonS3 implementation is quite stable. And I found a way directly in the AmazonAWS console to create accounts and sharing keys for users.

Anyway thanks for the suggestion, maybe I will give  a try by curiosity ;)

  • Like 1

Share this post


Link to post
Share on other sites

Just a small update:

I managed to get the module working without Composer. All SDKs can be downloaded separately and you can choose which one Cloud Service to use or even not use any at all.

 

And some precisions :

What is the primary goal of this module and how it works?

This module is a backup utility. It make a package which contain a full database dump + full website. The package can be saved locally or/and uploaded to a FTP server, GoogleDrive, Dropbox or AmazonAWS.

 

is it compatible with PW2? Guess not.

With 2.8 yes.  ProcessWire 2.7 need to be tested as now every SDKs can be downloaded separately. But it already works for saving package to a local folder.

 

I don't use composer. Any other way to install?

Just download the SDK you need.

 

I'm on windows. Will PWcron run?

Without any problem. Look at this answer to set up it: http://stackoverflow.com/questions/7195503/setting-up-a-cron-job-in-windows

 

What are google/dropbox/AWS needed for?

Only needed to upload a package to their service.

 

How can I restore the website? Is it possible to rebuild mine website on a other server?

Yes but you have to do it manually. You unzip the package (the zip file), upload your website, import you SQL database, adjust settings in config.php and tadaa, it works.

The final goal of the module is to automate this process, but is not yet implemented.

 

 

 

  • Like 5

Share this post


Link to post
Share on other sites

This morning, after some adjustments and tests, the module run smoothly on ProcessWire 2.7, 2.8 and 3.x.

  • Like 7

Share this post


Link to post
Share on other sites
On 07/03/2017 at 6:38 PM, antpre said:

Hi,

Looking forward to use this module.

Thanks for the work

Hi @antpre and everyone.  I lack time in recent days but the module should be available to the public the next coming week!

  • Like 4

Share this post


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

I lack time in recent days but the module should be available to the public the next coming week!

this is awesome news!

  • Like 1

Share this post


Link to post
Share on other sites

I feel really sorry. I have had some problems in recent months that have caused my brain to stop working .. And so I hesitated to launch the module knowing I could not give support.

Anyway, I'm better and I resume the development as soon as I have my internet connection operational (should be good for monday).

 

Sorry again guys!

  • Like 5

Share this post


Link to post
Share on other sites

Hi @flydev Nice to see you again. Looks like you are back on track. Any plans on working on this great module again? You have probably been waiting for this question ;)

  • Like 2

Share this post


Link to post
Share on other sites

And I was sure YOU will ask that ! :lol:O0

 

Sure, I am already trying to get back my Gitlab server. The server was hosted in a VMware guest machine, and when plugged the hdd and put the virtual machine ON, the network simply does not work anymore. Can't ping anything, but I know how to fix it, i am just too lazy those days. 

Edit: Just to say, I still have the code and used the module in the last days, but it look like its not the Windows compatible version..

  • Like 6

Share this post


Link to post
Share on other sites
On 07/03/2017 at 6:03 PM, gmclelland said:

Notice the /*NoCompile*/ to prevent PW3's file compiler from compiling the third party libraries.

I am checking for this, and it appear that all the SDKs are compiled despite using /*NoCompile*/ on the require_once.

Also I note that this feature was introduced in PW 3.0.43, so I assume the file will be compiled for PW 2.7. Concretely, what is the bad thing about leaving all those SDKs file being "FileCompiled" ?

 

	if($this->useFTP) {
            require_once(__DIR__ . '/Classes/FTPClient.php');
        }

        if($this->useAmazonS3) {
            require_once (/*NoCompile*/ __DIR__ . '/SDKs/aws/aws-autoloader.php');
            require_once(__DIR__ . '/Classes/ClientAmazonS3.php');
        }

        if($this->useDropbox) {
            require_once (/*NoCompile*/ __DIR__ . '/SDKs/dropbox/autoload.php');
            require_once(__DIR__ . '/Classes/ClientDropbox.php');
        }

        if($this->useGoogleDrive) {
            //require_once __DIR__ . '/SDKs/google/autoload.php'; // oh my..
            require_once (/*NoCompile*/ __DIR__ . '/Classes/GoogleAutoload.pain.php');
            googleAutoload();
            require_once(__DIR__ . '/Classes/ClientGoogleDrive.php');

        }

 

Anyway, for the people who have the module in hand, I bumped the module to the version 0.0.36. The Gitlab server is not running up but will give a download link in PM as I would appreciate a test on a Windows machine..

 

 

Edited by flydev
server up
  • Like 3

Share this post


Link to post
Share on other sites

Hello guys !

The Gitlab server is fixed and running, you can update the module to the latest version. All SDKs can be downloaded separately without using composer, the link of each SDK is provided in the module settings.

You must uninstall the previous version before testing it.

 

Thanks!

  • Like 4

Share this post


Link to post
Share on other sites
On 8/12/2017 at 4:19 AM, flydev said:

Concretely, what is the bad thing about leaving all those SDKs file being "FileCompiled" ?

Here's the documentation on that http://processwire.com/blog/posts/processwire-3.0.43-core-updates/#new-filecompiler-options

Without the /*NoCompile*/ it would probably cause unneeded additional processing.  I think Processwire would also probably try to add namespaces to those third party libs which may cause random problems.

The code above looks correct, I'm not sure why it is still compiling.

  • Like 1

Share this post


Link to post
Share on other sites

Today,  there is a small a preview of a successful deployment (on localhost) using Duplicator :

  • Create a package in the backend
  • Download the package and the installer
  • Upload it to the new hosting
  • Navigate and run the installer

 

Duplicator_process.thumb.gif.e02b8118ba9800c44d3ce1237e24d9ec.gif

 

  • Like 5

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