aboutsummaryrefslogtreecommitdiffstats
path: root/README.org
diff options
context:
space:
mode:
Diffstat (limited to 'README.org')
-rw-r--r--README.org33
1 files changed, 33 insertions, 0 deletions
diff --git a/README.org b/README.org
index 7d5e4d7..3e1c20f 100644
--- a/README.org
+++ b/README.org
@@ -354,3 +354,36 @@ $ ck edit emacs
# edit a specific emacs config, other than the primary
$ ck edit emacs accounts.el
#+END_SRC
+
+*** restore
+or r or -r
+
+Restore links.
+
+Given a working ck instance (ckdb + ckrc + directories in ckrc with configs)
+restore shall recreate the links from the config directories in ckrc
+back to their corresponding position when added in ck.
+
+It is useful for copying your configs to a new linux installation
+or restoring deleted links.
+
+It can either restore a specific program or all of them:
+#+BEGIN_SRC sh
+ # restore progName
+ ck restore -p progName
+ # restore all
+ ck r all
+#+END_SRC
+
+Note:
+If ck tracks configs that are owned by root, simply running
+`ck restore ...` will fail due to permissions. To remedy this, ck will alter the
+owner and group of a link to match the one in the ckrc directories.
+Thus, running `sudo ck -c /home/myuser/.ck restore ..` will restore
+the root user's links as it should and the user links will have
+the user as the owner instead of the root.
+
+ck checks that the configs exist and that the location for the link
+is avaliable before making any links. However, in the even that symlink
+fails for some other reason, the process will stop as is. Make sure you
+take care of the already created links, if that's the case.