Closed (fixed)
Project:
Backup and Migrate
Version:
5.1.x-dev
Component:
Code
Priority:
Normal
Category:
Feature request
Assigned:
Unassigned
Reporter:
Created:
11 Nov 2022 at 14:25 UTC
Updated:
22 Jul 2026 at 19:10 UTC
Jump to comment: Most recent, Most recent file



Comments
Comment #2
damienmckennaYeah, I completely agree that should be an option for scheduled backups.
Comment #3
tamerzg commentedComment #5
tamerzg commentedCreated MR with added support for Encryption in scheduled backups.
Now when creating a schedule there is Backup Encryption fieldset which will be disabled if defuse php encrpytion is not installed and appropriate message is shown:
If the library is installed then you can enable/disable Encryption and set password:
Also in case of update user is asked if he wants to change the password, since pw field doesn't have default value and this will prevent overwritting password each time Schedule form is saved again.
There is also an update hook which makes sure that previous Schedule configs have default value for new encrypt fields.
Since this PR has update hook, it would be good to also merge this PR: https://www.drupal.org/project/backup_migrate/issues/3338192
in order to get correct execution sequence.
Comment #6
damienmckennaThanks for working on this, we'll take a look at it soon.
FYI as a reminder the "Assigned" field is for indicating that you're actively working on an issue, once you're finished please set the field to "Unassigned". Thank you.
Comment #7
tamerzg commentedGotya about Assigned field.
I updated PR with new schema number for update hook (50002).
Comment #8
danrodTested this and works as expected, I can see the new "Encrypt" field in the "Schedule" config page, tested it as well, can be moved to RTBC if needed.
Comment #9
damienmckennaDid you test that the backup was encrypted?
Comment #10
danrodHi @damienmckenna , I'll revisit this issue today.
Comment #11
danrodComment #12
danrodI applied some changes in the file
src/Form/ScheduleForm.phpbecause the encrypt values weren't being saved every time I saved the form, I fixed this in the last commit. Reviewing the changes now.Comment #13
danrodI reviewed the functionality and works as expected, I set up a backup schedule every 5 minutes, ran cron and I could see the encrypted backup with I restored and worked with no issues, moving this to RTBC so anyone could have a chance to review this as well.
Comment #14
danrodComment #15
danrodComment #16
danrodI fixed some extra PHPCS space issues. Tested functionality and still working as expected.
Comment #17
danrodI'll merge it to the 5.1.x branch.
Comment #19
danrodComment #22
danrodCommitted the changes to the 5.0.x branch.