svn
Differences
This shows you the differences between two versions of the page.
| Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
| svn [2009/08/12 06:46] – suapapa | svn [2013/08/03 05:04] (current) – external edit 127.0.0.1 | ||
|---|---|---|---|
| Line 6: | Line 6: | ||
| </ | </ | ||
| ====== backup/ | ====== backup/ | ||
| - | 덤프떠서 보내기 | + | 덤프 |
| - | < | + | < |
| - | svnadmin dump /path/to/repo > dumpname.dump ; scp -rp dumpname.dump user@server.domain.com:/tmp/ | + | #!/usr/bin/python |
| + | import os, sys | ||
| + | |||
| + | def main(rootDir): | ||
| + | print os.path.realpath(rootDir) | ||
| + | repolist = os.listdir(rootDir) | ||
| + | repolist = map(lambda x: | ||
| + | print repolist | ||
| + | repolist = filter(os.path.isdir, | ||
| + | print repolist | ||
| + | |||
| + | dumplist = [] | ||
| + | for repo in repolist: | ||
| + | print ' | ||
| + | print ' | ||
| + | dumpName = ' | ||
| + | print ' | ||
| + | ret = os.system(' | ||
| + | if ret == 0: | ||
| + | dumplist.append(dumpName) | ||
| + | else: | ||
| + | sys.exit(1) | ||
| + | if not dumplist: | ||
| + | print ' | ||
| + | sys.exit(1) | ||
| + | print 'now making tar archive' | ||
| + | os.system(r' | ||
| + | +(' ' | ||
| + | |||
| + | if __name__ == ' | ||
| + | main(sys.argv[1]) | ||
| </ | </ | ||
| 복구 | 복구 | ||
svn.1250059587.txt.gz · Last modified: 2013/08/03 05:04 (external edit)