Jump to content

☁️ Duplicator: Backup and move sites


flydev

Recommended Posts

Hello, thanks @Autofahrn that solved the problem but I still have an issue and I think it depends on the fact I'm running on a windows server with IIS (I reverted to php 7.3.13). While a fresh install of the latest PW is going well, the install from duplicator doesn't, I'm stuck in the extraction of the package, it looks like the $_SESSION['package'] returns null at this point but right after the extraction the session was ok, in fact I saw the name of the package in the previous step. Any thoughts?
 

$this->package = $_SESSION['package'];
        if(is_null($this->package)) {
            $this->err("Something went wrong in the installer.");    //ATO: Typo
            return false;
        }

 

Schermata 2020-04-02 alle 09.33.13.jpg

  • Thanks 1
Link to comment
Share on other sites

meanwhile I contacted the sys admin and it looks like there is some server misconfiguration we can't fix yet, when I upload the zip I found out that I cannot rename it, probably that's why the installer is stuck...but I was able to install a fresh PW..btw right now i can't show you the steps since we deleted everything and making tests

  • Like 1
Link to comment
Share on other sites

  • 2 weeks later...

Hi @flydev ??,

A feature request...

It would be awesome if there was a feature to enter a selector string that determined the pages whose files will be included in the backup. So that if the selector string was "template=basic-page" then in the backup the only directories inside /site/assets/files/ would be those belonging to a basic-page.

My use case is that I sometimes need to copy a site to my local machine to do some work, but that work only involves one part of the site. My connection speed is not great where I live (particularly upload speed) so it would be a big help if I only needed to download/upload the related files and not all the site files.

Thanks for considering. ?

  • Thanks 1
Link to comment
Share on other sites

17 hours ago, Robin S said:

My use case is that I sometimes need to copy a site to my local machine to do some work, but that work only involves one part of the site. My connection speed is not great where I live (particularly upload speed) so it would be a big help if I only needed to download/upload the related files and not all the site files.

Have you ever tried on-demand downloading of files? https://processwire.com/blog/posts/pw-3.0.137/#on-demand-mirroring-of-remote-web-server-files-to-your-dev-environment

This works really great. You can start with a completely empty files folder and PW will download all requested files on demand - either on the frontend or on the backend.

  • Like 2
Link to comment
Share on other sites

11 hours ago, bernhard said:

Have you ever tried on-demand downloading of files?

Thanks for the reminder - I just tried this for the first time and it works well. 

I still think it would be a nice feature to add to Duplicator because it's more efficient time-wise to download all the images you need in one hit while you have a coffee rather than page by page as you edit. Plus I reckon people will find other use cases for selectively including page files in a backup.

  • Like 1
Link to comment
Share on other sites

On 4/15/2020 at 2:40 AM, Robin S said:

My use case is that I sometimes need to copy a site to my local machine to do some work, but that work only involves one part of the site. My connection speed is not great where I live (particularly upload speed) so it would be a big help if I only needed to download/upload the related files and not all the site files.

Thanks for considering. ?

Considered @Robin S

I also have a bad connection (working with a 4G router) and it's definitely a good feature request. I will try to implement it asap, but I would like to release first the module with the native backup feature but I lack time. I will try to do my best.

 

Thanks for the link @bernhard

Thanks again guys, I hope you're all fine here ??

  • Like 1
Link to comment
Share on other sites

Thank you for a fantastic module.

Would it be possible to exclude the database from the backup?

I ask because it get a timeout when running the backup, and I can move the database (which is quite large) by other means.

 

  • Like 2
Link to comment
Share on other sites

I plan to use this module as duplicater.

How is it handling database name?

I want to create a template PW site and clone it for new projects.

So i need to change the database name for every new clone. It should not overwrite former clones databases on the same server.

Can achive this with this module?

  • Like 1
Link to comment
Share on other sites

On 4/16/2020 at 12:00 PM, eydun said:

Thank you for a fantastic module.

Would it be possible to exclude the database from the backup?

I ask because it get a timeout when running the backup, and I can move the database (which is quite large) by other means.

 

Hi @eydun

I can definitely give an option to exclude the database dump (> in the todo list) . Anyway, can we know the details and type of the hosting server ?

On my side, I can backup a ~4GB database, but it's a windows server that I configured myself (still on Apache).

 

@huseyin any news ? could you achieve what you was looking for by choosing the database name in the installer ?

Link to comment
Share on other sites

Quote

I can definitely give an option to exclude the database dump (> in the todo list) . Anyway, can we know the details and type of the hosting server ?

Hi @flydev ?? It would be cool to be able to backup the site and files because of the nice zip-functionality and installer in Duplicator, without backing up the database. I was on a shared Linux host. I guess the timeout limit was set too low. Anyway now I am on a much better host (Linode). 

  • Thanks 1
Link to comment
Share on other sites

  • 1 month later...

Hello,

Tks for the module.  it's working fine (back up on local or S3). Could restore the site on my local instalation. However when tried to migrate site to an other server bump into this probleme.

The user mentionned her is the db user and has all the rigths. Can any body tell what should I be looking at.

Pretty sure the problem is with my server config and not with the module of course.

A fresh install of PW on the same serve works fine.

Tks

Screen Shot 2020-06-12 at 12.08.04.png

  • Like 1
Link to comment
Share on other sites

Hi @antpre

by looking at the exception, you are using the wrong credentials to access the database. But at the same time, the connection seem successful.

Could you check the credentials in the config.php ? 

If you feel confident, I can take a look at it more closely, you can send me the FTP access and the url through private message here in the forum.

 

Link to comment
Share on other sites

Tks for your answer. Indeed the connection is correct and all the tables are  created. this is why I was surprised.

I looked into the config.php. as per your advice and found the culprit.

the db user password has been truncated. The last 2 characters have been removed ! inital password was Bok03d$9 the password in the config.php is Bok03d

But the password was typed properly during the install phase and the db import went ok.

Any idea ?

  • Thanks 1
Link to comment
Share on other sites

Best bet is that the DollarSign and the following character was interpreted as a PHP variable. Try also paswords like: MyNiceStringStopsHere!$andNotHere

Or test with 'single-quotes' surrounding the password, if it currently has "Double Quotes". ?

  • Like 3
Link to comment
Share on other sites

  • 5 months later...

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...