![]() |
|
|
|
|
|||||||
| General General questions about the FreeBSD operating system. Ask here if your question does not fit elsewhere. |
![]() |
|
|
Thread Tools | Display Modes |
|
#1
|
|||
|
|||
|
I am fairly new to restoring a users home directory from a backup file.
I have a backupfile seating in the /usr/backups/ directory. A user mistakenly delted some of her email folders. I want to restore the users home directory without having to wait for long to extract the entire backup file. How do I go about doing that? Also, during the restore, i want to be able to restore without affecting new emails. Note* The backup file is zipped home.backup.tgz Thanks Last edited by albsallu; October 30th, 2009 at 20:30. |
|
#2
|
||||
|
||||
|
untar it....
read restore there's interactive mode.... with it you can do partial restore.... you can test stuff like that on your /tmp.... ![]() sorry I won't explain step by step... I'm to busy right now
__________________
vim is the best editor |
|
#3
|
|||
|
|||
|
man tar
tar -xzvf home.backup.tgz filename (replace the word 'filename' above with the file in the tar archive you want to extract. For example, if the mailbox you want to extract is named "vinnie", you would do this: tar -xzvf home.backup.tgz vinnie That will leave you with the file "vinnie" in your directory. Then, to restore it without deleting existing mail that has come in, cat vinnie /var/mail/vinnie > /var/mail/vinnie.tmp then mv /var/mail/vinnie.tmp /var/mail/vinnie. Then set the permissions back to what they should be with chown and chmod. If you are unsure what the filename is in the archive, you can do tar -tzvf home.backup.tgz to get a list, find the file, and do the above. Note that if there is a directory before the file, it will extract it there. |
![]() |
| Thread Tools | |
| Display Modes | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| System-wide backup / restore | Zare | General | 3 | October 31st, 2009 01:30 |
| A Restore Test | jaymax | General | 4 | September 4th, 2009 06:47 |
| Dump-Restore | jaymax | General | 1 | August 20th, 2009 13:58 |
| Trying to restore dumped filesystem... | osx-addict | General | 21 | March 15th, 2009 07:03 |
| [Solved] dump/restore failures - help! | Weaseal | General | 15 | February 11th, 2009 17:02 |