wp-media / backwpup

BackWPup - WordPress Backup Plugin
https://backwpup.com
GNU General Public License v2.0
88 stars 35 forks source link

Multiple Backups on WP Multisites #64

Open Christian-Roth opened 6 years ago

Christian-Roth commented 6 years ago

My WP Multisite creates multiple backups since the following change:

https://github.com/inpsyde/backwpup/commit/a4fb0a24f874c23d5b1bdf8b9417eeff4d877d77#diff-29b55d7c830b04ca5f3b553cfcd9f78a

And as far as I can see it: is_main_network() is always true for every site of my multisite. And so the backup cron is executed by every subpage.

This should work: if ( ! is_main_site() || ( ! is_main_network() && ! is_main_site() ) ) { return; }

Or:

if ( ! is_main_network() ) { return; }

if ( ! is_main_site() ) { return; }

pavelevap commented 6 years ago

I have the same problem, I will try to apply this fix, thank you very much @Christian-Roth!

When I run backup manually, there is only one backup archive, but when triggered by cron, then there are each backup archive for each site (only one of them is working and without problems).

mundschenk-at commented 6 years ago

There's at least one support ticket for this issue (from February 2018) with a proposed solution similar to the one above.

cuongdcdev commented 6 years ago

As I know, the latest ( 3.6 ) version fixed this issue

Christian-Roth commented 6 years ago

The issue got fixed at the wrong place :) As mentioned here: https://wordpress.org/support/topic/multi-site-wpcron-multiple-backups/page/2/#post-10435815 And here: https://wordpress.org/support/topic/multi-site-wpcron-multiple-backups/page/3/#post-10436561