LinuxQuestions.org
Review your favorite Linux distribution.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices


Reply
  Search this Thread
Old 04-28-2006, 07:54 PM   #1
carlosinfl
Senior Member
 
Registered: May 2004
Location: Orlando, FL
Distribution: Arch
Posts: 2,905

Rep: Reputation: 77
Owning A File?


I backed my home directory as I will make this a habit to do every Friday. I have lots of data I can't lose so I made a "tarball" of my only shell users home directory.

I ran the following command...

Code:
tar -cvzf /root/carlos_back.tar.gz /home/carlos
It created a nice 16GB tarball and then I ran the following command...

Code:
stricom:~# chown carlos carlos_back.tar.gz
Now I own the backup file of my home directory but it still shows its under roots group ownership. Can anyone please tell me what else I need to do so I don't have any permission issues if I ever need to un-tar this on a different or same machine? Can "carlos" un-tar this tarball w/o any problems or do I need to be root?

Code:
stricom:~# ls -la
-rw-r--r--   1 carlos root 16409579611 2006-04-28 14:23 carlos_back.tar.gz
 
Old 04-28-2006, 08:20 PM   #2
Brian1
LQ Guru
 
Registered: Jan 2003
Location: Seymour, Indiana
Distribution: Distribution: RHEL 5 with Pieces of this and that. Kernel 2.6.23.1, KDE 3.5.8 and KDE 4.0 beta, Plu
Posts: 5,700

Rep: Reputation: 65
Use the chgrp command for the group part.

Brian1
 
Old 04-28-2006, 08:48 PM   #3
gilead
Senior Member
 
Registered: Dec 2005
Location: Brisbane, Australia
Distribution: Slackware64 14.0
Posts: 4,141

Rep: Reputation: 168Reputation: 168
You can also use chown to accomplish that in one step. For example, if the user carlos was in the users group:
Code:
chown carlos:users carlos_back.tar.gz
If you leave the file under /root you'll still need to be root to untar it because the user carlos won't have rights to the /root directory. Once you move it to another directory you will be able to untar it.
 
Old 04-29-2006, 12:08 PM   #4
ioerror
Member
 
Registered: Sep 2005
Location: Old Blighty
Distribution: Slackware, NetBSD
Posts: 536

Rep: Reputation: 34
You shouldn't be backing up your home directory as root anyway.

Since you're going to be doing this regularly, as you should, it might be preferable to use a tool that can do incremental backups (dar for example), and maybe do a full backup once a month or so.
 
Old 04-29-2006, 01:27 PM   #5
carlosinfl
Senior Member
 
Registered: May 2004
Location: Orlando, FL
Distribution: Arch
Posts: 2,905

Original Poster
Rep: Reputation: 77
OK - so you're suggesting that I do back up my home dir as the owned user for that particular /home dir.

My next question is how complicated is "dar"? Are there any other options as well ? I just don't want to pick a super complex back up utility and become frustrated.
 
Old 04-29-2006, 01:59 PM   #6
ioerror
Member
 
Registered: Sep 2005
Location: Old Blighty
Distribution: Slackware, NetBSD
Posts: 536

Rep: Reputation: 34
Configuring dar is slightly more involved than a simple 'tar ...' and works slightly differently, but it is fairly straightforward once you've read the docs carefully.

There are loads of other backup utilities, there is a list here http://www.linuxlinks.com/Software/Backup/.

Also, have a look at http://www.linux-backup.net/App/.
 
  


Reply



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 On
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
microsoft now owning rights to FAT filesystem? Thebinaryman General 35 02-16-2006 07:49 PM
owning joker1000 Linux - Software 5 11-29-2005 03:44 PM
Finding the owning package of a file yadu Debian 2 11-12-2005 09:09 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - General

All times are GMT -5. The time now is 01:47 AM.

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
Open Source Consulting | Domain Registration