spatie / laravel-backup

A package to backup your Laravel app
https://spatie.be/docs/laravel-backup
MIT License
5.65k stars 763 forks source link

Possibility of adding timestamp to database dump filename #1717

Closed boryn closed 1 year ago

boryn commented 1 year ago

At this moment, after unzipping several dumps, the db filename always is the same - which makes it difficult to do any comparisons between them, and we are unaware when they have been taken.

With this PR, you can choose a timestamp format (through the 'database_dump_file_timestamp_format' config option), which will be inserted into the db dump filename and now it's clear when it was taken, eg.: mysql-PROJECT-2023-10-02-07-00-00.sql

freekmurze commented 1 year ago

Thanks! Could you add a test for this?

boryn commented 1 year ago

I'll try :) Do you mean creating a new test with this option set?

boryn commented 1 year ago

Ok, @freekmurze I have just added the 'appends timestamp to database backup file name' test for this.

freekmurze commented 1 year ago

Thanks!