2009-06-09, 09:54 AM
Currently backups have random filenames like:
backup_616440c859FIuUArse8TLeTzqVjL8vNA9y51kdOTnHC9junYTVx3XRfHzPO5VdlW.sql.gz
I'd prefer it if the filename could also contain some useful information such as the time it was created, like:
backup-20090427-182733-L8vNA9y5.sql.gz
(the backup was created on 27th of April 2009, at 18:27:33 hours, plus 8 random chars to prevent unauthorized downloading)
It'd be more useful than a random string, since when you download old backup files from a server, the timestamp of the file is usually from when you downloaded, and not from when the file was created, so the only other way to find out the date of a backup file is looking at the contents. Finding the latest backup when all you have is random filenames can be a pain.
When backups are written to a file, gzopen($file, 'w9') is used, setting the gzip level to 9 (best compression). However when downloading a backup directly, no level is set, so chances are that a much lower compression level is being used. I was stumped that when downloading I got a 62MB file, while the backup files on the server were only 25MB. Uncompressed they both amount to the same size though. Strangely enough even the lowest gzip level (1) gives me a smaller file than the 62MB I got from the download. Must be PHP doing something stupid.
It would be nice if the same compression level could be used for both files and downloads. It would be super duper nice if the level of compression could be customized.
backup_616440c859FIuUArse8TLeTzqVjL8vNA9y51kdOTnHC9junYTVx3XRfHzPO5VdlW.sql.gz
I'd prefer it if the filename could also contain some useful information such as the time it was created, like:
backup-20090427-182733-L8vNA9y5.sql.gz
(the backup was created on 27th of April 2009, at 18:27:33 hours, plus 8 random chars to prevent unauthorized downloading)
It'd be more useful than a random string, since when you download old backup files from a server, the timestamp of the file is usually from when you downloaded, and not from when the file was created, so the only other way to find out the date of a backup file is looking at the contents. Finding the latest backup when all you have is random filenames can be a pain.
When backups are written to a file, gzopen($file, 'w9') is used, setting the gzip level to 9 (best compression). However when downloading a backup directly, no level is set, so chances are that a much lower compression level is being used. I was stumped that when downloading I got a 62MB file, while the backup files on the server were only 25MB. Uncompressed they both amount to the same size though. Strangely enough even the lowest gzip level (1) gives me a smaller file than the 62MB I got from the download. Must be PHP doing something stupid.
It would be nice if the same compression level could be used for both files and downloads. It would be super duper nice if the level of compression could be customized.