UpdraftPlus Home › Forums › Paid support forum – UpdraftPlus backup plugin › WP-CLI Backup determination
Tagged: wp-cli
- This topic has 9 replies, 2 voices, and was last updated 6 years, 4 months ago by Jan.
-
AuthorPosts
-
June 6, 2018 at 10:45 pm #286271JanParticipant
I am wondering how the plugin determines that it should do a Full Backup versus a DB backup. I have created a shell script where I want the Full to run on Sundays and if it’s not Sunday then do a DB backup.
The settings for UpdraftPlus in WordPress is set to Manual for both types of backups. In my shell I am running wp updraftplus backup if it’s not Sunday, and wp updraftplus backup –include-files=”plugins,themes,uploads,wpcore,others” if it is Sunday.
The script is correct, but wp updraftplus backup is running a full every time.
What do I need to do differently?
Thanks.
JanJune 7, 2018 at 10:27 am #286354Dee NutbourneModeratorHi Jan,
When backing up via WP-CLI, the default value for
--include-files
as the ‘Include in files backup’ settings.You will need to either disable all sections of the file backup in the Settings tab, or pass the following to your database-only shell command:
--include-files=""
Best Wishes,
David NJune 8, 2018 at 1:09 am #286515JanParticipantthat doesn’t work. I used this: wp updraftplus backup –include-files=””
and I get this error: Error: The given value for the ‘include-files’ option is not validSo how do I go about just doing a DB backup?
Thanks.
JanJune 8, 2018 at 1:15 am #286519JanParticipantThat didn’t work. I ran this: wp updraftplus backup –include-files=”” and also –include-files=” ”
and I got this: Error: The given value for the ‘include-files’ option is not valid
So how do I just do a DB backup?
Thanks.
JanJune 8, 2018 at 5:25 pm #286671Dee NutbourneModeratorHi Jan,
You will need to go to the UpdraftPlus dashboard Settings tab, and disable all options in the ‘Include in files backup’ settings.
Then, run a backup without the--include-files
argument.Best Wishes,
David NJune 9, 2018 at 2:44 am #286753JanParticipantSorry to continue this conversation, but since I have to clear the options, is there a way to exclude files other than the backups, like backup*,*backups,backwpup*,wp-clone,snapshots and upgrade,cache,updraft,backup*,*backups,mysql.sql,debug.log?
Sorry, but I didn’t see this in the documentation.
Thanks.
JanJune 12, 2018 at 9:49 am #287299Dee NutbourneModeratorHi Jan,
Apologies for the delay.
Yes, the WP-CLI backup will still use the exclusion lists in the UpdraftPlus settings.
For instructions on excluding specific files/directories, please see this guide:
https://updraftplus.com/faqs/how-can-i-exclude-particular-filesdirectories-from-the-backup/Best Wishes,
David NJune 12, 2018 at 8:05 pm #287418JanParticipantNo problem on the delay.
The reason I asked is because when I clear the options, it also closes the excludes.
So, when I look at the link you show, since #1 won’t work, and because I’m using wp-cli, my only option would be #2 right? But that would only be for a directory. What about files?
Also, I noticed that #5 doesn’t appear right or I’m just not understanding what is happening. It says the filter to use is: updraftplus_skip_directory – but in the example it shows updraftplus_exclude_directory. So it’s a confusing on which one to use.
As always, thanks for the help.
JanJune 13, 2018 at 4:01 pm #287588Dee NutbourneModeratorHi Jan,
Apologies for the confusion.
I’ll make a note in our buglist to look into adding an exclusion parameter to the WP-CLI.
In the meantime, if you enable the relevant sections of the backup, add the files to the exclusion list, and then disable the sections, the list should still be saved and used for backups.
Best Wishes,
David NJune 15, 2018 at 9:14 pm #288061JanParticipantI re-enabled the sections(i.e. uploads), then the exclusions show , but when I disable again, so do the exclusions. I must be missing something or I misunderstood what you are saying.
Please let us know when the exclusions has been added.
Thanks.
Jan -
AuthorPosts
- The topic ‘WP-CLI Backup determination’ is closed to new replies.