Jump to content

☁️ 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
Link to comment
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
Link to comment
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
Link to comment
Share on other sites

  • 2 weeks later...

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
Link to comment
Share on other sites

I prefer third party libraries to be included and managed via composer, but if you do include them in this module make sure to do it like this:

https://github.com/gmclelland/TextformatterOEmbed/commit/ce3bdcd8145da3a369f56f34979cc0791fdb7fa8

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

  • Like 1
Link to comment
Share on other sites

  • 3 weeks later...
  • 4 weeks later...

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
Link to comment
Share on other sites

  • 3 months later...

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
Link to comment
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
Link to comment
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
Link to comment
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
Link to comment
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
×
×
  • Create New...