Jump to content

☁️ Duplicator: Backup and move sites


flydev

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

  • 2 weeks later...

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

  • 3 weeks later...

@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! 

Link to comment
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
Link to comment
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
Link to comment
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
Link to comment
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
Link to comment
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.

Link to comment
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?

Link to comment
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
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...