Mercurial Hosting > hghosting
annotate backup_repositories.sh @ 19:a90e510ccc4f
fix restart/move logs
author | Vadim Filimonov <fffilimonov@yandex.ru> |
---|---|
date | Mon, 05 Aug 2024 11:29:06 +0300 |
parents | 92a0646e38b6 |
children |
rev | line source |
---|---|
0 | 1 #!/bin/bash -e |
2 | |
3 . common.sh; | |
4 . local/backupcredentials.sh; | |
5 | |
6 mkdir -p $backuphome 2>/dev/null; | |
7 | |
1 | 8 repos=$(curl -sLu ${backupcredentials} http://${domain}/private/tools/links.txt) |
0 | 9 |
10 for repo in ${repos}; do | |
11 if [ ! -d ${backuphome}/${repo} ]; then | |
12 /usr/local/bin/hg clone http://${backupcredentials}@${domain}/repo/${repo} ${backuphome}/${repo}; | |
13 else | |
14 /usr/local/bin/hg pull -R ${backuphome}/${repo} -u http://${backupcredentials}@${domain}/repo/${repo}; | |
15 fi; | |
16 done; |