From 347778b749556e9fefdc61c467331751aba2c77c Mon Sep 17 00:00:00 2001 From: Thomas Waldmann Date: Thu, 18 Feb 2016 21:38:31 +0100 Subject: [PATCH] docs: add example how to restore a raw device also: do not use /dev/sda in case someone stupidly tries out the examples. /dev/sdx should be safe for people who do not understand what they do. --- docs/usage.rst | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/docs/usage.rst b/docs/usage.rst index 327ae820f..43d98dc7d 100644 --- a/docs/usage.rst +++ b/docs/usage.rst @@ -260,7 +260,7 @@ Examples $ borg create --chunker-params 10,23,16,4095 /mnt/backup::small /smallstuff # Backup a raw device (must not be active/in use/mounted at that time) - $ dd if=/dev/sda bs=10M | borg create /mnt/backup::my-sda - + $ dd if=/dev/sdx bs=10M | borg create /mnt/backup::my-sdx - # No compression (default) $ borg create /mnt/backup::repo ~ @@ -292,6 +292,9 @@ Examples # Extract the "src" directory but exclude object files $ borg extract /mnt/backup::my-files home/USERNAME/src --exclude '*.o' + # Restore a raw device (must not be active/in use/mounted at that time) + $ borg extract --stdout /mnt/backup::my-sdx | dd of=/dev/sdx bs=10M + Note: currently, extract always writes into the current working directory ("."), so make sure you ``cd`` to the right place before calling ``borg extract``.