toolkit
toolkit copied to clipboard
Wish: A way to take automatic backup of LaTeX source files frequently
Steps to Reproduce
- First, it isn't really a bug. I want to take frequent automatic backup.
- I am trying to setup cron job for commits and pushes to GitHub.
- The documentation in some place says it is important to make sure the content is in a consistent state, so backup only when no users are likely to be using Overleaf.
- I am thinking of only taking backup of LaTeX source only (which is what I want) from the compile directories, assuming that if someone changes, they will compile the project.
- I first thought that one directory each within the compile directory is created for each collaborator. So I can check for the latest compile and commit and push from that.
Expected Behaviour
I wouldn't say expected behaviour, but behaviour that I, perhaps wrongly, assumed would occur was that the directories within the compile directories are organized according to users and the projects they are working on.
Observed Behaviour
I noticed that directories within the compile directory are not organized according to the authors and their projects. Instead, there is just one directory per compile and these are temporary directories.
Context
I am just trying to setup a cron job for automatic commits and pushes to GitHub frequently of only the source files. I know that there is a GitHub Actions based solution for doing this, but I don't really understand that. In any case, the issue is about getting the source files committed to the respective repositories. Something similar to what the Overleaf V2 public web version does with Git and GitHub sync.
Technical Info
N/A
- URL: N/A
- Browser Name and version: N/A
- Operating System and version (desktop or mobile): N/A
- Signed in as: N/A
- Project and/or file: N/A
Analysis
I wonder if it is possible in future to organize directories within the compile directory according to users and their projects, so that one can directly take a backup from there.
Otherwise, perhaps it may be possible to have some way to extracting the source files for a given project using some command or script and then take backup of that in any way one likes. Of course, Overleaf already extracts these files into the compile directory, so there must be way to do this easily.
Perhaps I just need to enter the Docker image shell and use some command, using something provided by one of the services (as in the services folder of the Overleaf source code) such as the git-bridge service? At a glance through the git-bridge folder, the git-bridge service seems to be doing this. Can someone help with how this can be done? I would like to avoid going through the mongo database directly, as I might make some bad mistake there.
It will make the CE version really more helpful. Since git-bridge is written in Java, a language I am comfortable with, perhaps with some pointers, I can even do it myself and contribute a little bit.
The question seems very interesting to me