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

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?