Part-DB / Part-DB-server

Part-DB is an Open source inventory management system for your electronic components
https://docs.part-db.de/
GNU Affero General Public License v3.0
891 stars 96 forks source link

--overwrite doesn't work #635

Closed Gajillion closed 3 months ago

Gajillion commented 3 months ago

Describe the bug partdb:backup option --overwrite should allow overwriting destination output file, even if it exists. Instead, backup fails.

To Reproduce Steps to reproduce the behavior:

  1. Run initial backup with /usr/bin/docker exec --user=www-data partdb php bin/console partdb:backup --full /var/www/html/var/db/backups/backup.zip
  2. /var/www/html/var/db/backups/backup.zip is successfully created.
  3. Run another backup with the same command.
  4. Command fails immediately

    [INFO] Backup Part-DB to /var/www/html/var/db/backups/backup.zip
    
    The file /var/www/html/var/db/backups/backup.zip already exists. Do you want to overwrite it? (yes/no) [no]:
    >
    
    [ERROR] Backup aborted!

Expected behavior backup file recreated in place with same name.

Server Side

jbtronics commented 3 months ago

Fixed