summaryrefslogtreecommitdiff
path: root/Upgrading.md
diff options
context:
space:
mode:
authorrfjakob2016-06-09 23:22:03 +0200
committerrfjakob2016-06-09 23:22:03 +0200
commite24fe56f713b6b83b9b854bf3de9b2508561cf99 (patch)
treef07b4520fe3ff95fb22971ee9cf69b0570cb536f /Upgrading.md
parented9e4c2b569ed49dc45ca09a6ab288550aaadec1 (diff)
Created Upgrading (markdown)
Diffstat (limited to 'Upgrading.md')
-rw-r--r--Upgrading.md28
1 files changed, 28 insertions, 0 deletions
diff --git a/Upgrading.md b/Upgrading.md
new file mode 100644
index 0000000..274f4f6
--- /dev/null
+++ b/Upgrading.md
@@ -0,0 +1,28 @@
+### Upgrading a gocryptfs filesystem
+
+To upgrade your filesystem, you create a new empty one with the newer version of gocryptfs, mount it, and copy all the files over.
+
+Let's assume you have an old gocryptfs filesystem stored in `/old.enc`, mounted to `/old`. You have created a new filesystem in `/new.enc` and mounted it to `/new`. The `df -Th` output would look like this:
+
+```
+$ df -Th
+Filesystem Type Size Used Avail Use% Mounted on
+[...]
+/new.enc fuse.gocryptfs 30G 23G 5,7G 80% /new
+/old.enc fuse.gocryptfs 30G 23G 5,7G 80% /old
+```
+
+Now you can simply use your graphical file manager to copy the files (or see the next sections for using command-line tools).
+
+Once you feel confident that have remembered the new passphrase (if you picked a new one) AND have stored the new masterkey at a safe place (this one is definitely new), delete `old.enc`.
+
+#### Using rsync
+
+I recommend using rsync because it allows to resume interrupted copies and is generally a lot smarter than anything else.
+
+```
+$ shopt -s dotglob
+$ rsync -av /old/* /new
+```
+
+The bash option `dotglob` makes sure that `/old/*` also matches hidden files (dotfiles). \ No newline at end of file