문제

SVN을 처음 사용하는데 Windows 환경에서 저장소를 백업하는 데 사용할 수있는 방법을 알고 싶습니다.

도움이 되었습니까?

해결책

(Linux)와 같은 것을 사용할 수 있습니다. 라코 디스

Windows는 GZip을 지원하지 않으므로 다음과 같습니다. 라코 디스

다른 팁

우리는 svnadmin hotcopy를 사용합니다. 예 : 라코 디스

에 따라: <인용구>

다른 프로세스가 저장소를 사용하고 있는지 여부에 관계없이 언제든지이 명령을 실행하고 저장소의 안전한 사본을 만들 수 있습니다.

물론 백업 복사본을 ZIP (바람직하게는 7-Zip) 할 수 있습니다.IMHO 백업 옵션 중 가장 간단합니다. 재난 발생시 다시 제자리로 압축을 푸는 것 외에는 할 일이 거의 없습니다.

Subversion 웹 사이트에는 백업 자동화에 매우 편리한 hotbackup.py 스크립트가 있습니다.

http : // svn.apache.org/repos/asf/subversion/trunk/tools/backup/hot-backup.py.in

다음은 Perl 스크립트입니다.

  1. 저장소 백업
  2. SCP를 통해 다른 서버로 복사
  3. 백업 검색
  4. 백업에서 테스트 저장소 만들기
  5. 테스트 결제 수행
  6. 오류가있는 경우 이메일 (cron을 통해)

    스크립트 : 라코 디스

    이 유형의 백업에 대한 합리성에 대한 스크립트 소스 및 자세한 내용.

svnsync 를 사용합니다.미러 / 슬레이브로 원격 서버.2 주 전에 서버가 다운되어 슬레이브를 기본 위치로 아주 쉽게 전환 할 수있었습니다 (슬레이브 저장소의 UUID를 원래 위치로 재설정하기 만하면 됨).

또 다른 이점은 동기화가 두 서버의 작업이 아닌 중개인이 실행할 수 있다는 것입니다.두 VPN에 대한 클라이언트가 두 VPN간에 저장소를 동기화했습니다.

svnadmin 핫 카피

라코 디스 <인용구>

이 하위 명령은 모든 후크, 구성 파일 및 데이터베이스 파일을 포함하여 저장소의 전체 "핫"백업을 만듭니다.

svnbackup 은 .NET 콘솔 애플리케이션 인 Google 코드를 통해 제공됩니다.

기본적으로 svn 서버가 중지 된 경우 저장소 폴더를 복사하는 것이 안전합니다. (출처 : https://groups.google. com / forum /? fromgroups #! topic / visualsvn / i_55khUBrys % 5B1-25 % 5D )

따라서 서버를 중지 할 수있는 경우 스크립트 나 백업 도구를 사용하여 서버를 중지하고 저장소를 복사하면됩니다. Cobian Backup은 서비스를 자동으로 중지하고 시작할 수 있기 때문에 여기에 잘 맞으며 증분 백업을 수행 할 수 있으므로 최근에 변경된 저장소의 일부만 백업 할 수 있습니다 (저장소가 크고 원격 위치에 백업하는 경우 유용함). ).

예 :

  1. Cobian Backup 설치
  2. 백업 작업 추가 :

    • 소스를 저장소 폴더로 설정 (예 : C:\Repositories\),

    • 사전 백업 이벤트 "STOP_SERVICE" VisualSVN 추가

    • 백업 후 이벤트 추가, "START_SERVICE" VisualSVN,

    • 필요에 따라 다른 옵션을 설정합니다. 이전 백업 제거, 백업 일정, 대상, 압축 포함 등 증분 백업을 설정했습니다. 아카이브 분할 등

    • 이익!

svn 서버를 백업하는 두 가지 주요 방법이 있습니다. 첫 번째는 저장소 파일의 사본을 생성하는 핫 카피입니다.이 접근 방식의 주요 문제는 기본 파일 시스템에 대한 데이터를 저장하므로 약간의 어려움이있을 수 있습니다. 이러한 종류의 백업을 다른 svn 서버 종류 또는 다른 시스템에 복원하려고합니다. 덤프라는 또 다른 유형의 백업이 있습니다.이 백업은 기본 파일 시스템의 정보를 저장하지 않으며 tigiris.org 하위 버전을 기반으로하는 모든 종류의 SVN 서버에 사용할 수 있습니다.

백업 도구에 대해 명령 프롬프트에서 svnadmin 도구 (핫 카피 및 덤프를 수행 할 수 있음)를 사용할 수 있습니다.이 콘솔은 svn 서버가있는 동일한 디렉토리에 상주하거나 svn 백업 도구를 Google에서 찾을 수 있습니다.

제 권장 사항은 두 종류의 백업을 모두 수행하고 사무실에서 이메일 계정, amazon s3 서비스, ftp 또는 azure 서비스로 가져 오는 것입니다. 그러면 svn 서버를 호스팅하지 않고도 보안 백업을 할 수 있습니다. 사무실 밖 어딘가에.

다음은 로컬 및 원격 하위 버전 저장소의 덤프를 만드는 GUI Windows 도구입니다.

https://falsinsoft-software.blogspot.com/p/svn-backup-tool.html

도구 설명은 다음과 같습니다.

이 도구를 사용하면 로컬 및 원격 Subversion 저장소의 덤프 백업을 만들 수 있습니다.소프트웨어는 "svnadmin"과 동일한 방식으로 작동하지만 GUI 프런트 엔드가 아닙니다.대신 다른 추가 도구없이 독립형 모드에서 덤프를 만들 수 있도록 Subversion 라이브러리를 직접 사용하세요.

도움이 되길 바랍니다 ...

전체 repo 디렉토리를 백업 위치에 복사하고 싶습니다.이렇게하면 어떤 일이 발생하면 디렉토리를 다시 복사하고 즉시 사용할 수 있습니다.

필요한 경우 권한을 보존하기 만하면됩니다.일반적으로 이것은 Linux 시스템에서만 문제가됩니다.

호스팅 된 저장소의 경우 svn 버전 1.7부터 svnrdump <를 사용할 수 있습니다./ a>는 로컬 리포지토리에 대한 svnadmin dump와 유사합니다.이 문서 는 멋진 안내를 제공합니다.본질적으로 다음과 같이 요약됩니다. 라코 디스

덤프 파일을 다운로드 한 후 로컬로 가져올 수 있습니다. 라코 디스

또는 원하는 호스트에 업로드하세요.

FSFS 저장소 형식 (기본값)을 사용하는 경우 저장소 자체를 복사하여 백업을 만들 수 있습니다.이전 BerkleyDB 시스템에서는 저장소가 플랫폼 독립적이지 않으며 일반적으로 svnadmin 덤프를 사용하고 싶을 것입니다.

svnbook 문서topic for backup 은 사용중인 파일과 같은 문제를 처리하므로 svnadmin hotcopy 명령을 권장합니다.

라코 디스

내 백업을 수행하는 실행중인 배치 파일입니다.

일일 및 전체 백업 솔루션의 경우 여기에서 SVN 백업 스크립트 .

I have compiled the steps I followed for the purpose of taking a backup of the remote SVN repository of my project.

install svk (http://svk.bestpractical.com/view/SVKWin32)

install svn (http://sourceforge.net/projects/win32svn/files/1.6.16/Setup-Subversion-1.6.16.msi/download)

svk mirror //local <remote repository URL>

svk sync //local

This takes time and says that it is fetching the logs from repository. It creates a set of files inside C:\Documents and Settings\nverma\.svk\local.

To update this local repository with the latest set of changes from the remote one, just run the previous command from time to time.

Now you can play with your local repository (/home/user/.svk/local in this example) as if it were a normal SVN repository!

The only problem with this approach is that the local repository is created with a revision increments by the actual revision in the remote repository. As someone wrote:

The svk miror command generates a commit in the just created repository. So all the commits created by the subsequent sync will have revision numbers incremented by one as compared to the remote public repository.

But, this was OK for me as I only wanted some backup of the remote repository time to time, nothing else.

Verification:

To verify, use the SVN client with the local repository like this:

svn checkout "file:///C:/Documents and Settings\nverma/.svk/local/"  <local-dir-path-to-checkout-onto>

This command then goes to checkout the latest revision from the local repository. At the end it says Checked out revision N. This N was one more than the actual revision found in the remote repository (due to the problem mentioned above).

To verify that svk also brought all the history, the SVN checkout was run with various older revisions using -r with 2, 10, 50 etc. Then the files in <local-dir-path-to-checkout-onto> were confirmed to be from that revision.

At the end, zip the directory C:/Documents and Settings\nverma/.svk/local/ and store the zip somewhere. Keep doing this regularly.

as others have said, hot-backup.py from the Subversion team has some nice features over just plain svnadmin hotcopy

I run a scheduled task on a python script that spiders for all my repositories on the machine, and uses hotbackup to keep several days worth of hotcopies (paranoid of corruption) and an svnadmin svndump on a remote machine. Restoration is really easy from that - so far.

1.1 Create Dump from SVN (Subversion) repository

svnadmin dump /path/to/reponame > /path/to/reponame.dump

Real example

svnadmin dump /var/www/svn/testrepo > /backups/testrepo.dump

1.2 Gzip Created Dump

gzip -9 /path/to/reponame.dump

Real example

gzip -9 /backups/testrepo.dump

1.3 SVN Dump and Gzip Dump with One-liner

svnadmin dump /path/to/reponame | gzip -9 > /path/to/reponame.dump.gz

Real example

svnadmin dump /var/www/svn/testrepo |Â gzip -9 > /backups/testrepo.dump.gz

How to Backup (dump) and Restore (load) SVN (Subversion) repository on Linux.
Ref: svn subversion backup andrestore

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top