diff options
author | rfjakob | 2016-06-09 23:41:04 +0200 |
---|---|---|
committer | rfjakob | 2016-06-09 23:41:04 +0200 |
commit | a2906babd18f828bc5a13e99f5cc3f327aadbfe3 (patch) | |
tree | 5820fa0414dff5745cbdeb0b5ed6fcc3a618b808 /Upgrading.md | |
parent | fc7bb5d14f4187f6d9a59930b5586591210d5a5d (diff) |
Updated Upgrading (markdown)
Diffstat (limited to 'Upgrading.md')
-rw-r--r-- | Upgrading.md | 15 |
1 files changed, 13 insertions, 2 deletions
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 |