0

When I do a backup, we transfer It to another server and today I wanted to unzip to check the contents and It asks me for a password.

I checked the config files, documentation, but I cannot seem to find where to find It or how to set It

Package: spatie/laravel-backup

Eligijus
  • 634
  • 1
  • 6
  • 15

2 Answers2

1

In the config of spatie/laravel-backup is the following entry:

    /*
     * The password to be used for archive encryption.
     * Set to `null` to disable encryption.
     */
    'password' => env('BACKUP_ARCHIVE_PASSWORD'),

So either is here a password set or have a look to your .env file and search for BACKUP_ARCHIVE_PASSWORD.

stefket
  • 774
  • 5
  • 12
  • I am on spatie backup v6 – Eligijus Nov 21 '22 at 08:48
  • Have you checked your .env file? Another way to check your password is by starting `php artisan tinker` and then execute `config('backup.backup.password');` – stefket Nov 21 '22 at 08:53
  • I have It as null. Even if It set the BACKUP_ARCHIVE_PASSWORD and try to unpack It with 7z x (backup name) i get prompted to add the password and it always fails – Eligijus Nov 21 '22 at 11:25
  • 1
    Okay, that sounds strange. Before this feature was introduced, there was an suggestion to manipulate the zip archive by listening to the `BackupZipWasCreated` event, perhaps you have some event here in your project? – stefket Nov 21 '22 at 11:41
  • Yes, you were correct. I had an Event listener that was overwriting how the backup is encrypted. Thanks for the idea! – Eligijus Nov 22 '22 at 06:02
0

As @stefket suggested, we had a BackupZipWasCreated event listener that was overwriting how backups are encrypted.

Kudos to @stefket!

Eligijus
  • 634
  • 1
  • 6
  • 15