Jump to content
flydev

Duplicator: Backup and move sites

Recommended Posts

1 minute ago, Peter Knight said:

If I want this backup task to run every day at X pm/am I correct in thinking I require PWCron Module and I need to paste the appropriate command into the PWCron Modules to run field

4 0 * * * php /var/www/vhosts/mydomain.com/site/modules/PwCron/cron.php >/dev/null 2>&1

Personally I wouldn't bother with PWCron - I would use a normal system cron (via crontab -e or similar). This is the simplest and most customizable approach.

  • Like 3

Share this post


Link to post
Share on other sites

Hi, I'm just installed this module to try a new way to do my backups, and I have a question: where is stored in Google Drive the backup file?

Share this post


Link to post
Share on other sites

hi @Krlos the file is stored in a folder called Duplicator on the drive account, then the file is shared with the email address you configure in Duplicator > GoogleDrive settings.

Share this post


Link to post
Share on other sites

Hi @flydev

On 12/27/2017 at 11:50 AM, Peter Knight said:

Looking forward to DropBox integration too. I notice it's temporarily parked.

Me too :P  Any news on it?

 

Share this post


Link to post
Share on other sites

Hi, I just want to thank to flydev and everyone else who has contributed to this wonderful module.

For me, Duplicator It has worked flawlesly to make backups and bring those backups to my local machine to test new functionality.

Sincerely a fellow Processwire developer.

 

  • Like 8
  • Thanks 1

Share this post


Link to post
Share on other sites

yeah i also want to thank @flydev for the awesome work on this, massively appreciated!

  • Like 4
  • Thanks 1

Share this post


Link to post
Share on other sites

Hi

I just installed this module but I cannot use it. I don-t have any "Backup now" button.

Is someone can help me ?

5a5e3a1bdccc6_ModulesProcessWireanglewebfr.thumb.png.5704e084ab07beeaac8fc1ca36340d49.png

Thanks in advance

 

Share this post


Link to post
Share on other sites

Hi @sebr

You have to install the Process module called ProcessDuplicator.

You can find it in the menu Modules > Install > ProcessDuplicator then once installed, you will find the module under Setup > Duplicator or click the link <eye-icon> Package Manager in Duplicator.

 

dup.png.208a7b44d2712712217bc1964bb80864.png

 

Edited by flydev
precision
  • Like 2

Share this post


Link to post
Share on other sites

@flydev - I think I must be missing something, but I am still confused about the storage of backups on Google Drive. My local backups are keeping the last 10 and removing the oldest once to enable adding of the new one. The problem is that on Google Drive it only stores 10, and won't add anymore unless I manually delete one so that there are only 9 stored before the next backup runs.

Maybe I am supposed to use the "Remove backup packages older than" option, but I am not really sure how to make that work as I want. I would like to keep daily backups for 10 days so that there are always 10 stored backups. The options to remove are minute, day, week, month, year, but none of these would delete on the 10th day - does that make sense?

The other thought I have is what about the ability to keep daily backups for a week, and then weekly backups (1 per week), monthly (1 per month), etc like you can do with rsnapshot and other solutions?

Thanks! 

Share this post


Link to post
Share on other sites

Why are there two modules? Can the main module be used without the "Packages Manager" module?

Why the "sort by name" button and not use the table header?

rXQuN9O.png

Delete all button goes all the way to the right because no "position: relative" on parent. You could also float it to right.

HchEBgm.png

Sorry if these were already discussed.

  • Thanks 1

Share this post


Link to post
Share on other sites
3 minutes ago, fbg13 said:

Why are there two modules? Can the main module be used without the "Packages Manager" module?

Yes, the Process module under Setup > Duplicator is not necessary to run the backups. I guess the only reason that the interface in the that process module is not in the config settings for the main module is so that you can give access permission to use it to non-superusers.

 

  • Like 3

Share this post


Link to post
Share on other sites

Hy Flydev, a big thanks for this module that is offering a nice backup/duplication solution. That's realy helpfull. In 30 minutes I was up and running uploading the backups on an S3 buckets. Great.
I have one question though. What about the restoring process. I am a bit confused about it. I saw the post were you put that animated gif showing it. But now that package are not the same (meaning they are both zip files and i dont see the installer.php). Could you sum up the process please. and eventualy add it in the module description page.

Thanks again

  • Thanks 1

Share this post


Link to post
Share on other sites

Hi,

2 hours ago, antpre said:

What about the restoring process.

duplicator-installer-shot.png.12e57fd63e019e83a59c4af15a53643c.png

Download the installer called "installer.php" and put it next to the ZIP package in the site root directory. So they must reside in the same directory. Access installer.php from the browser.

  • Like 2

Share this post


Link to post
Share on other sites

Thanks szabesz

That's clear. I was just looking at the zip file that had  been uploaded to the S3 bucket (in my case) and i was not finding the installer. thanks

I have one question. Imagine your site is corrupted or innacessible for any sort of reason. Then you cannot access the admin on your site. You will have the backup package (the .zip) but how how will I get the install file if the site down ? How to restore your site in this senario ?

Sorry if my question sounds stupid.

Share this post


Link to post
Share on other sites

Also, you do not really need the installer. If you have the db and the files, then they can be restored manually. The installer is there to make the process a lot faster and semi-automatic, less error-prone.

Share this post


Link to post
Share on other sites

@flydev Hi,

I was fiddling with the package name config and accidentally created one package named like this:

2018-02-05_21-16-00-{timestamp}_mysite_loc.zip.package.zip

I could not delete it with the Package Manager's trash icon + clicking the Delete button of the confirmation dialog (nothing happened). Maybe because of the curly brackets?

Share this post


Link to post
Share on other sites

@szabesz  Yes and because the sanitizer used on filename: https://processwire.com/api/ref/sanitizer/filename/

 

@adrian I will test GoogleDrive, but if you choose to keep 10 backups, it should keep deleting the oldest backup and adding the new one without the need to use the "Remove Backup Packages Older Than" option. I remember and Its possible that I changed one settings last time I pushed an update. I will check.

 

@antpre Thanks for the feedback! 👍

  • Like 2

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 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: https://modules.processwire.com/modules/inputfield-repeater-matrix-duplicate/
    • 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 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...