Using Git to backup moodledata: Difference between revisions

From MoodleDocs
m (Just a draft)
 
mNo edit summary
Line 1: Line 1:
[[GIT]] is a distributed source code management system. For the purpose of this document, GIT's basic feature is that it allows to keep the whole history of a directory tree and track all changes. The basic idea of using GIT as a backup tool is that you can clone you moodledata directory on other disk and/or computer.
[[GIT]] is a distributed source code management system. For the purpose of this document, GIT's basic feature is that it allows to keep the whole history of a directory tree and track all changes. The basic idea of using GIT as a backup tool is that you can clone you moodledata directory on other disk and/or computer.
Transform your moodledata into the git repository:
git init
git add .
git commit -m "Initial commit of moodledata"
Create a backup clone on local machine, e.g. on a separate disk
git clone --no-hardlinks --bare /srv/www/data/moodle_cz/.git datamoodle_cz.git

Revision as of 13:06, 2 April 2008

GIT is a distributed source code management system. For the purpose of this document, GIT's basic feature is that it allows to keep the whole history of a directory tree and track all changes. The basic idea of using GIT as a backup tool is that you can clone you moodledata directory on other disk and/or computer.

Transform your moodledata into the git repository:

git init
git add .
git commit -m "Initial commit of moodledata"


Create a backup clone on local machine, e.g. on a separate disk

git clone --no-hardlinks --bare /srv/www/data/moodle_cz/.git datamoodle_cz.git