I’ve got Apache cron making a back up tar file of my Codeigniter application and placing it in /backup of the server. I’d like to send this to Github, but I’m a little stuck about how to do this (my shell script and Git experience is limited).
Any ideas gratefully appreciated.
Thanks!
Sending a tar back to a Git repo (GitHub or not) doesn’t strike me as a long-term solution, because Git wouldn’t be able to diff that binary file (the tar), and that would rapidely increase the size of that remote repo.
If you still want to do that, it is a simple:
Then, for the first time:
But, for the other instances where you want to push again an updated backup tar file, I would recommend:
In other words, the idea would be to not record the history of that file, but to systematically erase the remote version with a new one.
In then end, a directory synchronization service like dropbox (for instance) might be much simpler to use 😉