I'm developing a php-application that collects certain data from a bunch of servers.
I backup this data regularly. Quite often I also want to restore the database to a certain state while developing. For instance there might be a bug related to a certain backed up state. I've got this set up with bat-files which dump the database to a new file, and let me restore to a certain dump-file. However the data now also include filesystem-files which are pointed to by database-fields. How would one in a convenient way backup both the database and the related files in a synchronized manner, and so that they are isolated from the rest of the project-files? One way that came to mind while writing this is to put all files that relate to the database in a common folder and then have a nested git repository ("Submodules") along with git-hooks that dump database when committing and restores during checkout. But I've got no experience with submodules this and wonder if this even would be a sensible way of doing it?