Closed (fixed)
Project:
Backup and Migrate: Flysystem
Version:
5.0.0-alpha1
Component:
Code
Priority:
Normal
Category:
Feature request
Assigned:
Reporter:
Created:
22 Sep 2020 at 10:31 UTC
Updated:
9 Jun 2021 at 12:54 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #3
jonmcl commentedI went with "^4 || ^5"
This should allow you to install version 5 of backup_migrate without forcing it onto others. Version 5 is still not the recommended release for backup_migrate and I haven't really done enough testing.
To install backup_migrate version 5.0.0-rc1 into your site, use:
composer require 'drupal/backup_migrate:^5.0'Comment #4
rodrigoaguileraSweet. Thanks!
Comment #5
rodrigoaguileraSo the latest release allowed me to test this module alongside backup_migrate 5 and I discovered that there is changes in the namespaces so the module produces fatal errors.
I attach the patch to solve those but from a maintainers point of view I don't know how feasible is to maintain compatibility without using ugly ifs for the
usestatements.Probably the best is to revert this and release a 2.0.x branch with the changes for v5 compatibility.
Thanks for the cool module and your efforts!
Comment #6
rodrigoaguileraI left some parts without editing
Comment #7
jonmcl commentedI knew I needed to do some real testing :)
There are also 2.0.x branches now for the Flysystem modules. I was going to create a new branch to properly support them as well.
I will try and get something committed in the next few days. In the meantime, I will revert the backup_migrate 5.0.x compatibility in composer.json.
Comment #8
rodrigoaguileraAaand the latest patch that actually saves the file :)
The only problem I noticed is it doesn't save the metadata (.info file) because the whole saveFile is overridden.
In the meantime I realized I don't even need this module because flysystem already defines stream wrappers that I can use with the "Server File Directory" destination of backup_migrate and it works perfectly. Maybe that is worth mentioning in the description of the module.
Thanks for all the support, I hope the patches are useful
Comment #9
rodrigoaguileraHmmm, using just the wrapper lead me to a lot of seek errors so I went back to this module.
There is more calls to underscore methods that I ignored. With this changes is able to read files from a directory.
Comment #10
jonmcl commentedThank you for all the patches so far. I do plan to work on this in the coming days, but might not have a release ready for at least a week.
Yes, I found that the standard stream wrappers created by Flysystem didn't work out and that's why this module was created.
So far I've found some changes with the Backup and Migrate classes and plugins definitions. Some of it might require changes to this module's plugin implementations.
Have you considered just using Backup and Migrate v4? Or is there a v5 requirement that you have?
Comment #11
rodrigoaguileraMainly for D9 compatibility
Comment #12
jonmcl commentedOf course. That makes sense. I forgot that v4 isn't compatible.
Comment #13
fjgarlin commentedHi, I'm attempting to update to Drupal 9 and I see that the progress on this got kind of stuck and a change was even reverted, forcing to backup_migrate version 4.1.
Is there any progress on a 2.x branch and fully D9 compatible version?
I'll try to put something together with the above patches and the suggestions about versions, etc. but wanted to know if there was any other update that I'm not aware of.
Thanks.
Comment #14
fjgarlin commentedComment #15
fjgarlin commentedMostly the above patch by @rodrigoaguilera, together with the Rector fixes, but I also changed some annotations and the requirements on the info and json files.
Comment #16
fjgarlin commentedComment #17
jonmcl commentedAhh screw it .. "We'll do it live!" :)
Everything appears to be working EXCEPT you can't rely on the restore buttons that appear on the "Saved Backups" page. At least with S3 buckets, it's not working. You must download the backup file first and then you can use the standard "Restore" page and upload the file.
Comment #18
fjgarlin commentedGreat, this will make the whole D9 upgrade much easier. Thanks.