Not coding goof but I got you all beat.....
Way back in ancient times say around '04 I reused a forum that I had stashed away and moved a bunch of topics into it. Unfortunately it had pruning enabled, think I was using it for classifieds previously. Of course all the posts got deleted in it and that's not the worse part. At the time I was religiously making backups once every couple of days.... the trouble is I made one after moving topics into this forum and deleted the old one.
By the time I realized what happened there was no chance of recovery. I lost about 1200 topic and this was at a time when I only had perhaps 5K of them total. To this day I'm always checking the prune box is not ticked even if it's brand new forum.
Lesson learned.... A nuclear bomb can hit the data center my server is in and at worst I'll lose an hour of data.
I have scheduled task on my local computer to FTP into the server and download the backups and new files. I'll also set aside archives of the uploaded files in case of corruption, e.g. the backup becomes corrupted. This is something a lot of people don't account for.
Suppose the files on the server become corrupted for whatever reason and you are not aware of it, if you download and overwrite your existing backup they are both toast.