|
3632.
|
|
|
To restore a file from the archive to a different directory enter:
|
|
|
|
(no translation yet)
|
|
Translated by
Adi Roiban
|
|
Reviewed by
Adi Roiban
|
|
|
|
Located in
serverguide/C/backups.xml:265(para)
|
|
3633.
|
|
|
tar -xzvf /mnt/backup/host-Monday.tgz -C /tmp etc/hosts
|
|
|
|
tar -xzvf /mnt/backup/host-Monday.tgz -C /tmp etc/hosts
|
|
Translated by
Cristi Nistor
|
|
Reviewed by
Adi Roiban
|
|
|
|
Located in
serverguide/C/backups.xml:269(command)
|
|
3634.
|
|
|
The <emphasis>-C</emphasis> option to <application>tar</application> redirects the extracted files to the specified directory. The above example will extract the <filename>/etc/hosts</filename> file to <filename>/tmp/etc/hosts</filename>. <application>tar</application> recreates the directory structure that it contains.
|
|
|
|
(no translation yet)
|
|
Translated by
Adi Roiban
|
|
Reviewed by
Adi Roiban
|
|
|
|
Located in
serverguide/C/backups.xml:271(para)
|
|
3635.
|
|
|
Also, notice the leading <emphasis>"/"</emphasis> is left off the path of the file to restore.
|
|
|
|
(no translation yet)
|
|
|
|
Located in
serverguide/C/backups.xml:276(para)
|
|
3636.
|
|
|
To restore all files in the archive enter the following:
|
|
|
|
(no translation yet)
|
|
Translated by
Adi Roiban
|
|
Reviewed by
Adi Roiban
|
|
|
|
Located in
serverguide/C/backups.xml:281(para)
|
|
3637.
|
|
|
cd /
|
|
|
|
cd /
|
|
Translated by
Cristi Nistor
|
|
Reviewed by
Adi Roiban
|
|
|
|
Located in
serverguide/C/backups.xml:285(command)
|
|
3638.
|
|
|
sudo tar -xzvf /mnt/backup/host-Monday.tgz
|
|
|
|
sudo tar -xzvf /mnt/backup/host-Monday.tgz
|
|
Translated by
Cristi Nistor
|
|
Reviewed by
Adi Roiban
|
|
|
|
Located in
serverguide/C/backups.xml:286(command)
|
|
3639.
|
|
|
This will overwrite the files currently on the file system.
|
|
|
|
(no translation yet)
|
|
Translated by
Adi Roiban
|
|
Reviewed by
Adi Roiban
|
|
|
|
Located in
serverguide/C/backups.xml:291(para)
|
|
3640.
|
|
|
For more information on shell scripting see the <ulink url="http://tldp.org/LDP/abs/html/">Advanced Bash-Scripting Guide</ulink>
|
|
|
|
(no translation yet)
|
|
|
|
Located in
serverguide/C/backups.xml:300(para)
|
|
3641.
|
|
|
The book <ulink url="http://safari.samspublishing.com/0672323583">Teach Yourself Shell Programming in 24 Hours</ulink> is available online and a great resource for shell scripting.
|
|
|
|
(no translation yet)
|
|
|
|
Located in
serverguide/C/backups.xml:305(para)
|