Hi!

A small SVN problem?

I have an online svn server that I have had for some time that I used for a software project. I want to close that account so I don't have to pay the monthly fee. But before I do that I want to download the entire repository with the entire file history etc to a local svn server on my computer.

Questions...

Will I need to install a svn server or what not (I use a mac)?
How do I download the repository with all files and history into the new repo?

Thanks!

Dani AI

Generated

If you need the full repository history (not just the current tree), a plain checkout won’t do. is right if you only want the latest files, but to preserve every revision you should export the repository itself. Below are practical, well-tested options depending on what access you have to the hosted server.

If you have shell/SSH access on the host: create a dump or a hotcopy, transfer it, then load it locally.

  • Remote (on the host)
    svnadmin dump /path/to/repo > repo.dump
    gzip repo.dump
    # or: svnadmin hotcopy /path/to/repo /tmp/repo_copy
  • Transfer
    scp user@host:/path/to/repo.dump.gz ~/Downloads/
    # or scp -r user@host:/tmp/repo_copy ~/local/
  • Local (on your Mac)
    svnadmin create /Users/you/svn/MyRepo
    gunzip -c ~/Downloads/repo.dump.gz | svnadmin load /Users/you/svn/MyRepo

If you do NOT have shell access but the repo is available over HTTP(S)/WebDAV: use svnsync to mirror the repository (destination must allow revprop changes).

svnadmin create /Users/you/svn/MyRepo

# allow svnsync to set revision properties on the local mirror:
cat > /Users/you/svn/MyRepo/hooks/pre-revprop-change <<'EOF'
#!/bin/sh
exit 0
EOF
chmod +x /Users/you/svn/MyRepo/hooks/pre-revprop-change

svnsync init file:///Users/you/svn/MyRepo https://host/path/to/repo
svnsync sync file:///Users/you/svn/MyRepo

If you only have a working copy (no server access) you cannot reconstruct full history — ask the host for an svnadmin dump or a hotcopy. If your Subversion client supports svnrdump, you can produce a dump remotely:

svnrdump dump https://host/path/to/repo > repo.dump

Notes and checks: after import run svn log and compare top revision numbers to confirm completeness; preserve hook scripts and permissions if you later serve the repo (file:// is fine for local use, or run svnserve/Apache+mod_dav_svn for network access). On macOS, install Subversion tools via Xcode Command Line Tools, Homebrew, or MacPorts if not already present.

You only need the svn client. Just check out the latest copy:

svn co 

You want to check out the entire repository so if you normally commit against "/svn/MyReposName/trunk" you will want to check out "/svn/MyResposName".

As far as hosting SVN you can host it on your local harddrive but it won't be available remotely. You can install libapache2-svn or websvn if you have an apache server to access it remotely. I think SourceForge has free SVN hosting but it might open your source code up to the world.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.