git over SSH without github
It is time to upgrade this site, but I want a backup of the code before I do it, I may even lose the git repository. The site consists of the git repository that holds the drupal php code and the MySQL database. So, here's how I backup it up without resorting to github.
First, I backup the database with my own script dobackup:
dobackup database_user_and_name
Then, I make a copy of the git repository:
git clone ssh://username@hostname/absolute-path-to-git-repo
Finally, update drupal using drush, but without depending on drush to be flawless:
drush pm-update drupal ... drush up ... git add . git commit
That's all there is to it, assuming you've set up the SSH keys properly. Now as long as I can remember it the next time I update Drupal core.