bk relink(7.3ce)            BitKeeper User's Manual           bk relink(7.3ce)

NAME
       bk relink - recreate broken hard links

SYNOPSIS
       bk relink [-q] <from> [<from2 ...>] <to>
       bk relink [-q]

DESCRIPTION
       The relink command is used to conserve disk space.  It is typical for a
       single user to have many repositories, each one representing a  differ-
       ent  work in progress.  It is also typical to use the "-l" option to bk
       clone to create hard-linked  repositories.   A  hard-linked  repository
       uses  much less space than a copied repository.  As files are modified,
       the links are broken.  As the same set of changes come into  a  set  of
       repositories,  the  links  could  be restored.  That is what the relink
       command does.

       The relink command looks at each BitKeeper file in the  <from>  reposi-
       tory  and if it is the same as the same file in the <to> repository, it
       replaces the file in the <from> repository with a hard link to the file
       in the <to> repository.

       If  no  repositories are specified, then <from> defaults to the current
       repository and <to> defaults to all parent[s] of  the  current  reposi-
       tory.

OPTIONS
       -q  Run quietly.

WARNINGS
       While  hard-linked repositories are less disk intensive than replicated
       repositories, they are also more vulnerable to disk or file system cor-
       ruption.   It is advisable to always have at least one recent copy of a
       repository, rather than 100% hard-linked repositories.

       It is possible to break all the  links  by  recomputing  the  per  file
       checksums:

           bk repocheck
           bk -A admin -z

NOTE
       This  command  works  only on filesystems which support hard links, and
       only if both repositories are in the same file system.

       On recent (2014) versions of Ubuntu (and  other  Linux  distributions),
       the  use  of  hardlinks  has  been curtailed for security reasons.  See
       http://man7.org/linux/man-pages/man5/proc.5.html and  search  for  pro-
       tected_hardlinks.  The relink command will fail in this case.

SEE ALSO
       bk clone

CATEGORY
       Repository

BitKeeper Inc                         1E1                     bk relink(7.3ce)