Unable to specify destination path on runtime #1900
Replies: 10 comments 1 reply
-
@usmanibrahim74 did you find a solution so far? I'm running into the same problem, changing the backup config on runtime in the past worked, but it doesn't seem to work any more. |
Beta Was this translation helpful? Give feedback.
-
@usmanibrahim74 @rubenkuipers Any ideas for a solution? I also ran into this problem after upgrading to a newer version. |
Beta Was this translation helpful? Give feedback.
-
@freekmurze Are there plans to support changing the configuration runtime? To support multi-tenant environments where every tenant has it's own backup configuration. |
Beta Was this translation helpful? Give feedback.
-
@inserve-paul I've found a way by modifying some calls that load the config settings in several functions, but haven't had time to create a solid fork yet.. will let you know when I have. It would be great if this feature could be supported, I would say this is used much more often. |
Beta Was this translation helpful? Give feedback.
-
@rubenkuipers That sounds good! Would be great if we could still make use of this package in combination with multi tenancy |
Beta Was this translation helpful? Give feedback.
-
@inserve-paul I'd accept a PR for this if the changes to support this are minimal. |
Beta Was this translation helpful? Give feedback.
-
@rubenkuipers Would you like to share your (temporary) solution so I can look at creating a PR? |
Beta Was this translation helpful? Give feedback.
-
@inserve-paul I created a fork with optional solution. I'm not 100% sure if the main...rubenkuipers:laravel-backup:main cc @freekmurze |
Beta Was this translation helpful? Give feedback.
-
@rubenkuipers Thanks! Should loading of the Config not also happen in the BackupCommand itself? Since that's where the magic happens. Or maybe add it to the BaseCommand as a method like 'loadConfiguration' ? @freekmurze What do you think? |
Beta Was this translation helpful? Give feedback.
-
@freekmurze Another approach could be to add an extra input option to the BackUpCommand, what do you think of this? Adding this to the signature: And this to the handle() method:
That way it isn't breaking anything and up to the user to add the extra option when calling the command. |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
II was trying this solution to change the directory of backup on runtime. but this doesn't seem to work. any way we can achieve this?
#129 (comment)
there is a workaround I found which is to change the root of filesystem and setting the app name to empty string in backup.php . But I don't like it. is there any better solution?
config(['filesystems.disks.s3.root' => $tenant->id]);
return [
Beta Was this translation helpful? Give feedback.
All reactions