Script to include date in the dump file filename

The date of the latest dump could also be put in the filename, which would be handy... but we're not quite sure how to do this. If you like this idea, and know exactly how to do it, please leave a note on the talk page - thanks!

Going by the script posted in the page, the following modification would do the trick on a POSIX-compilant system:

cd /home/apropos/appropedia.org/approbackups
/usr/local/php5/bin/php ../maintenance/dumpBackup.php --current | gzip > appropedia-$(date +%F)-dump.xml.gz

Note the added date command. It should produce filenames like this:

appropedia-2012-03-20-dump.xml.gz

Also note that I'm using the ISO date format. Among other things, it have the benefit that a computer could sort them using simple alphabetical ordering. (That could be useful if someone plans to store more than one version of the dump.)

--Dragonfi 14:17, 20 March 2012 (PDT)

Thank you! I've added it to our tech workstream. When we have a volunteer or intern to work on tech things (hopefully soon!) we'll look at getting this implemented. --Chriswaterguy 05:16, 21 March 2012 (PDT)
Cookies help us deliver our services. By using our services, you agree to our use of cookies.