diff --git a/docs/admin/restore-deleted-repositories.rst b/docs/admin/restore-deleted-repositories.rst new file mode 100644 --- /dev/null +++ b/docs/admin/restore-deleted-repositories.rst @@ -0,0 +1,42 @@ +.. _restore-deleted-repositories: + +Restoring Deleted Repositories +============================== + +By default when repository or whole repository group is deleted an archived copy +of filesystem repositories are kept. You can see them as special entries in the +repository storage such as:: + + drwxrwxr-x 3 rcdev rcdev 4096 Dec 4 2017 rm__20171204_105727_400795__ce-import + drwxrwxr-x 6 rcdev rcdev 4096 Nov 21 2017 rm__20180221_152430_675047__svn-repo + drwxr-xr-x 7 rcdev rcdev 4096 Mar 28 2018 rm__20180328_143124_617576__test-git + drwxr-xr-x 7 rcdev rcdev 4096 Mar 28 2018 rm__20180328_144954_317729__test-git-install-hooks + + +Data from those repositories can be restored by simply removing the +`rm_YYYYDDMM_HHMMSS_DDDDDD__` prefix and additionally only in case of Mercurial +repositories remove the `.hg` store prefix.:: + + rm__.hg => .hg + + +For Git or SVN repositories this operation is not required. + +After removing the prefix repository can be brought by opening +:menuselection:`Admin --> Settings --> Remap and Rescan` and running `Rescan Filesystem` + +This will create a new DB entry restoring the data previously removed. +To restore OLD database entries this should be done by restoring from a Database backup. + +RhodeCode also keeps the repository group structure, this is marked by entries that +in addition have GROUP in the prefix, eg:: + + drwxr-xr-x 2 rcdev rcdev 4096 Jan 18 16:13 rm__20181130_120650_977082_GROUP_Test1 + drwxr-xr-x 2 rcdev rcdev 4096 Jan 18 16:13 rm__20181130_120659_922952_GROUP_Docs + + + +.. note:: + + RhodeCode Tools have a special cleanup tool for the archived repositories. Please + see :ref:`clean-up-cmds` diff --git a/docs/admin/system-admin.rst b/docs/admin/system-admin.rst --- a/docs/admin/system-admin.rst +++ b/docs/admin/system-admin.rst @@ -30,3 +30,5 @@ The following are the most common system enable-debug admin-tricks cleanup-cmds + restore-deleted-repositories +