LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 08-30-2011, 10:04 PM   #1
sanjibgupta
Member
 
Registered: Apr 2003
Location: Kolkata
Posts: 214

Rep: Reputation: 30
Backup


Hi
I use the cron to take the backup of my home directories (nearly 200 directories are there) xx and yy and many other directories which is in /home directory every day
tar cf home.tar /home

But I try to restore the tar file under the /home directory the files the restore as
/home/home/xx,/home/home/yy,.....
How can I restore directory directly under /home and not under /home/home

Thanking you
Sanjib Gupta
 
Old 08-30-2011, 11:43 PM   #2
blue_print
Member
 
Registered: May 2010
Location: In world
Distribution: RHEL, CentOS, Ubuntu
Posts: 275
Blog Entries: 3

Rep: Reputation: 50
Do the following,

Code:
cd /
Then hit your restore command. Please be aware of that this will overwrite all previous /home data.
 
Old 08-31-2011, 12:16 AM   #3
sanjibgupta
Member
 
Registered: Apr 2003
Location: Kolkata
Posts: 214

Original Poster
Rep: Reputation: 30
Thanks for reply. But will be any problem if /home directory is present as it gets mounted on booting.
Sanjib
 
Old 08-31-2011, 12:20 AM   #4
blue_print
Member
 
Registered: May 2010
Location: In world
Distribution: RHEL, CentOS, Ubuntu
Posts: 275
Blog Entries: 3

Rep: Reputation: 50
As long as you do not have any valid content on the /home, you can restore the backup. Whatever you're restoring on /home, those will be written on the partition mounted on /home
 
Old 08-31-2011, 10:09 AM   #5
vivanguarda
Member
 
Registered: Sep 2008
Location: RJ-Brazil
Distribution: Slackware
Posts: 181

Rep: Reputation: 5
There is a windows app called Deep Freeze and it does a similar function. On Linux uses it is an ofris app http://http://sourceforge.net/projects/dafturnofris-id/.

I adapted a LQ tutorial and did a /home restorer.

http://www.linuxquestions.org/linux/...eeze_for_Linux


#cd
#tar -cpPf /home/seguro/normalbkp.tar /home/normal
/home/seguro ( root permissions )
#vi /etc/rc.d/rc.local ( initiation scripts slackware )
#rm -fR /home/normal ( delete and prevent overwriter )
#tar -xpPf /home/seguro/normalbkp.tar ( copy initial home )


If you are using a virtualization ( VirtualBox or VMWare ) itīs a little bit different.

Last edited by vivanguarda; 08-31-2011 at 10:10 AM.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Newbie trying to write a simple backup script to backup a single folder Nd for school stryker759a Linux - Newbie 2 09-16-2009 09:52 AM
Windows Backup Software (diff backup without archive bit) nkhajanchi.mg@gmail.com Linux - Software 4 09-09-2009 10:29 AM
backup question - NFS share in Ubuntu 9.04 backup to READYNAS NV+ newellrp1 Linux - Newbie 3 05-19-2009 04:57 PM
LXer: Automatic backup for sporadically connected clients with Box Backup LXer Syndicated Linux News 0 08-29-2008 09:40 PM
Backup system ala rdiff-backup, but without mirror and with dst encryption dr_dex Linux - Software 0 08-04-2008 04:39 AM


All times are GMT -5. The time now is 02:11 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration