Skip to content
Snippets Groups Projects
management.md 1.03 KiB
Newer Older
# Managing mirrored repositories

Sam Gleske's avatar
Sam Gleske committed
A short overview of managing mirrored repositories.  This assumes you have already [installed gitlab-mirrors](installation.md).
Sam Gleske's avatar
Sam Gleske committed
Create a git repository mirror.

    su - gitmirror
    cd gitlab-mirrors
    ./add_mirror.sh --git --project-name someproject --mirror http://example.com/project.git

Sam Gleske's avatar
Sam Gleske committed
Create an SVN repository mirror.

    su - gitmirror
    cd gitlab-mirrors
    ./add_mirror.sh --svn --project-name someproject --mirror svn+ssh://user@svn.example.com/srv/repos/someproject --authors-file ./authors.txt

The `--authors-file` option is an optional argument.

### Delete a mirror

Sam Gleske's avatar
Sam Gleske committed
    cd gitlab-mirrors
    ./delete_mirror.sh --delete someproject
Sam Gleske's avatar
Sam Gleske committed
    cd gitlab-mirrors
    ./update_mirror.sh project_name

### Update all known mirrors

    su - gitmirror
Sam Gleske's avatar
Sam Gleske committed
    cd gitlab-mirrors
    ./git-mirrors.sh

Updating all known mirrors is also meant to be used with `crontab`.

Sam Gleske's avatar
Sam Gleske committed
    @hourly /home/gitmirror/gitlab-mirrors/git-mirrors.sh