Skip to content

This issue was moved to a discussion.

You can continue the conversation there. Go to discussion →

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Copying zip failed because: File already exists at path #1269

Closed
sutcliffe121 opened this issue Mar 21, 2021 · 0 comments
Closed

Copying zip failed because: File already exists at path #1269

sutcliffe121 opened this issue Mar 21, 2021 · 0 comments

Comments

@sutcliffe121
Copy link

Problem:
Running php artisan backup:run gives the following error:
Copying zip failed because: File already exists at path: CJS-Web/NEW2021-03-21-12-11-08.zip.

My Setup:
I am trying this locally with a Laravel 8 site and I am trying to get the back up to save to a Digital Ocean Space by setting up a new file system using the S3 driver.

My config/backup.php:
/*
* The disk names on which the backups will be stored.
*/
'disks' => [
'public', 'do'
],

My config/filesystems.php:
'do' => [
'driver' => 's3',
'key' => env('DO_ACCESS_KEY_ID'),
'secret' => env('DO_SECRET_ACCESS_KEY'),
'region' => env('DO_DEFAULT_REGION'),
'bucket' => env('DO_BUCKET'),
'endpoint' => env('DO_ENDPOINT'),
'url' => env('DO_URL'),
],

My .env:
FILESYSTEM_DRIVER=do

DO_ACCESS_KEY_ID=removed
DO_SECRET_ACCESS_KEY=removed*
DO_ENDPOINT=https://fra1.digitaloceanspaces.com
DO_DEFAULT_REGION=FRA1
DO_BUCKET=removed
DO_URL=https://removed.fra1.cdn.digitaloceanspaces.com

Output from back up failed email:
Whoops!
Important: An error occurred while backing up CJS Web

Exception message: File already exists at path: CJS-Web/NEW2021-03-21-12-09-05.zip

Exception trace: #0 D:\laragon\www\cjs\vendor\league\flysystem\src\Filesystem.php(82): League\Flysystem\Filesystem->assertAbsent('CJS-Web/NEW2021...') #1 D:\laragon\www\cjs\vendor\spatie\laravel-backup\src\BackupDestination\BackupDestination.php(92): League\Flysystem\Filesystem->writeStream('CJS-Web/NEW2021...', Resource id #7747, Array) #2 D:\laragon\www\cjs\vendor\spatie\laravel-backup\src\Tasks\Backup\BackupJob.php(265): Spatie\Backup\BackupDestination\BackupDestination->write('D:\laragon\www...') #3 D:\laragon\www\cjs\vendor\laravel\framework\src\Illuminate\Collections\Traits\EnumeratesValues.php(234): Spatie\Backup\Tasks\Backup\BackupJob->Spatie\Backup\Tasks\Backup{closure}(Object(Spatie\Backup\BackupDestination\BackupDestination), 0) #4 D:\laragon\www\cjs\vendor\spatie\laravel-backup\src\Tasks\Backup\BackupJob.php(275): Illuminate\Support\Collection->each(Object(Closure)) #5 D:\laragon\www\cjs\vendor\spatie\laravel-backup\src\Tasks\Backup\BackupJob.php(154): Spatie\Backup\Tasks\Backup\BackupJob->copyToBackupDestinations('D:\laragon\www...') #6 D:\laragon\www\cjs\vendor\spatie\laravel-backup\src\Commands\BackupCommand.php(56): Spatie\Backup\Tasks\Backup\BackupJob->run() #7 D:\laragon\www\cjs\vendor\laravel\framework\src\Illuminate\Container\BoundMethod.php(36): Spatie\Backup\Commands\BackupCommand->handle() #8 D:\laragon\www\cjs\vendor\laravel\framework\src\Illuminate\Container\Util.php(40): Illuminate\Container\BoundMethod::Illuminate\Container{closure}() #9 D:\laragon\www\cjs\vendor\laravel\framework\src\Illuminate\Container\BoundMethod.php(93): Illuminate\Container\Util::unwrapIfClosure(Object(Closure)) #10 D:\laragon\www\cjs\vendor\laravel\framework\src\Illuminate\Container\BoundMethod.php(37): Illuminate\Container\BoundMethod::callBoundMethod(Object(Illuminate\Foundation\Application), Array, Object(Closure)) #11 D:\laragon\www\cjs\vendor\laravel\framework\src\Illuminate\Container\Container.php(610): Illuminate\Container\BoundMethod::call(Object(Illuminate\Foundation\Application), Array, Array, NULL) #12 D:\laragon\www\cjs\vendor\laravel\framework\src\Illuminate\Console\Command.php(136): Illuminate\Container\Container->call(Array) #13 D:\laragon\www\cjs\vendor\symfony\console\Command\Command.php(256): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Illuminate\Console\OutputStyle)) #14 D:\laragon\www\cjs\vendor\laravel\framework\src\Illuminate\Console\Command.php(121): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Illuminate\Console\OutputStyle)) #15 D:\laragon\www\cjs\vendor\spatie\laravel-backup\src\Commands\BaseCommand.php(16): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 D:\laragon\www\cjs\vendor\symfony\console\Application.php(971): Spatie\Backup\Commands\BaseCommand->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 D:\laragon\www\cjs\vendor\symfony\console\Application.php(290): Symfony\Component\Console\Application->doRunCommand(Object(Spatie\Backup\Commands\BackupCommand), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #18 D:\laragon\www\cjs\vendor\symfony\console\Application.php(166): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #19 D:\laragon\www\cjs\vendor\laravel\framework\src\Illuminate\Console\Application.php(92): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #20 D:\laragon\www\cjs\vendor\laravel\framework\src\Illuminate\Foundation\Console\Kernel.php(129): Illuminate\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #21 D:\laragon\www\cjs\artisan(37): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #22 {main}

@spatie spatie locked and limited conversation to collaborators Mar 21, 2021

This issue was moved to a discussion.

You can continue the conversation there. Go to discussion →

Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants