"Links not supported" error when running "backup:monitor" #1367
-
Running version 6.15.1 of laravel-backup on Laravel 8.36.2 Since the upgrade from 6.14.3 of laravel-backup the "backup:monitor" reports unhealthy backups due to the "local" filesystem not being reachable. I was able to circumvent this problem with the option
That does not seem to be a good long term solution though. |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 3 replies
-
I don't have the time to look into this now, but I'd accept a PR that solves this. |
Beta Was this translation helpful? Give feedback.
-
Did you try V7? /** @test */
private function createSymlinkDisk() {
symlink($this->getDiskRootPath('local'), $this->getTempDirectory('symlink_disk'));
config()->set('filesystems.disks', array_merge(config()->get('filesystems.disks'), [
'symlink' => [
'driver' => 'local',
'root' => $this->getTempDirectory('symlink_disk'),
]
]));
config()->set('backup.monitor_backups.0.disks', ['symlink']);
}
/** @test */
public function it_succeeds_when_destination_is_symlink()
{
$this->createSymlinkDisk();
$this->artisan('backup:monitor')->assertExitCode(0);
Event::assertDispatched(HealthyBackupWasFound::class);
}
/** @test */
public function it_succeeds_when_destination_is_symlink_and_unhealthy()
{
$this->createSymlinkDisk();
config()->set('backup.monitor_backups.0.health_checks', [
\Spatie\Backup\Tasks\Monitor\HealthChecks\MaximumAgeInDays::class => ['days' => 1],
]);
$this->create1MbFileOnDisk('symlink', 'mysite/test.zip', \Carbon\Carbon::now()->subSecond()->subDay());
$this->artisan('backup:monitor')->assertExitCode(1);
Event::assertDispatched(UnhealthyBackupWasFound::class);
} Maybe I misunderstood the problem |
Beta Was this translation helpful? Give feedback.
Did you try V7?
I made a test for this and it's ok