From a2906babd18f828bc5a13e99f5cc3f327aadbfe3 Mon Sep 17 00:00:00 2001 From: rfjakob Date: Thu, 9 Jun 2016 23:41:04 +0200 Subject: Updated Upgrading (markdown) --- Upgrading.md | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) (limited to 'Upgrading.md') diff --git a/Upgrading.md b/Upgrading.md index 3bd621b..627eef6 100644 --- a/Upgrading.md +++ b/Upgrading.md @@ -31,11 +31,22 @@ The bash option `shopt -s dotglob` makes sure that `/old/*` also matches hidden If you don't have the space to store a copy of your data, you can use the `--remove-source-files` option to rsync. This will delete each file after it has been transferred. Note that `mv` is pretty dumb: it copies everything and only then deletes the source files, so you will still need twice the space. -As mentioned above, make sure you remember the passphrase for `/new` and have the masterkey. +As mentioned earlier, double-check that you remember the passphrase for `/new` and have the new masterkey saved somewhere before moving the files. ``` $ shopt -s dotglob $ rsync -av --remove-source-files /old/* /new ``` -As above, `dotglob` makes sure that dotfiles in `/old/` are copied as well. \ No newline at end of file +As above, `dotglob` makes sure that dotfiles in `/old/` are copied as well. + +When rsync is finished, it will leave an empty directory tree in `/old`. A safe way to delete these directories is: + +``` +find /old -type d -delete +``` + +This is safer than `rm -R` because it will only remove directories and error out if any files are left behind. Note that it will also try to delete the mountpoint `/old` and fail at doing so. This is expected: +``` +find: cannot delete ‘/old’: Device or resource busy +``` \ No newline at end of file -- cgit v1.2.3