Paul,...all I can say is,...SWEEET !!
Started playing with this on my VPS last night and could only get it to work in a public_html directory. Got tired and shut it down and went to bed.
This morning read each and every post trying to get this to work in a non-public directory and found that "../backups/" was what worked for me (not "../../backups/") (renamed "backups to something I prefer) and now stores in non-public directory. I feel better now that nobody can get to it.
I set the timestamp to numerical day of month (d) so since I have the storage space, will allow me to keep the last 30 (or so by month) days copies of backups before they start to overwrite when the month rolls over, which I prefer. This way when I do my weekly or so downloads of backing up my files, I can capture all 30 db backups in one process and store them offsite.
edit to add - Also changed my cron time to reflect a time trigger in an area where I know someone will be trafficking my site to avoid dead times that will not trigger the backup. (only takes ~60 seconds and I lock and repair tables settings on to keep the data stable) My visitors will barely notice that 1 minute.
Tested, Locked, and Loaded.
Thank you for this solution.
|