Which optins should I use to back up files

Which optins should I use to back up files

am 04.11.2007 05:05:29 von struggle

Hi,
I want to back up many files using gnu tar. I used -p to reserve the
user previlidge property. Do you mind to tell me that is there any other
special options should I take to make a better tar file? Thanks !

Regards!
Bo

Re: Which optins should I use to back up files

am 04.11.2007 09:24:34 von Cyrus Kriticos

Bo Yang wrote:
>
> I want to back up many files using gnu tar. I used -p to reserve the
> user previlidge property. Do you mind to tell me that is there any other
> special options should I take to make a better tar file? Thanks !

[GNU tar]

"--create" and "--verify" is adequate. If you want a POSIX compliant
archive "--format=posix".

You need "-p" only when you _extract_ files and you are not user root.

--
Best regards | Be nice to America or they'll bring democracy to
Cyrus | your country.

Re: Which optins should I use to back up files

am 05.11.2007 14:58:21 von struggle

Cyrus Kriticos :
> Bo Yang wrote:
>>
>> I want to back up many files using gnu tar. I used -p to reserve the
>> user previlidge property. Do you mind to tell me that is there any
>> other special options should I take to make a better tar file? Thanks !
>
> [GNU tar]
>
> "--create" and "--verify" is adequate. If you want a POSIX compliant
> archive "--format=posix".
>
> You need "-p" only when you _extract_ files and you are not user root.
>

Thank you very much!

Regards!
Bo

Re: Which optins should I use to back up files

am 05.11.2007 17:47:05 von wayne

Bo Yang wrote:
> Hi,
> I want to back up many files using gnu tar. I used -p to reserve the
> user previlidge property. Do you mind to tell me that is there any other
> special options should I take to make a better tar file? Thanks !
>
> Regards!
> Bo

Note that tar doesn't by default backup ext[234] attributes, nor
any extended attributes (including selinux labels). Try using
"--xattrs" to back that stuff up as well.

-Wayne

Re: Which optins should I use to back up files

am 05.11.2007 23:26:04 von wayne

Wayne wrote:
> Bo Yang wrote:
>> Hi,
>> I want to back up many files using gnu tar. I used -p to reserve the
>> user previlidge property. Do you mind to tell me that is there any other
>> special options should I take to make a better tar file? Thanks !
>>
>> Regards!
>> Bo
>
> Note that tar doesn't by default backup ext[234] attributes, nor
> any extended attributes (including selinux labels). Try using
> "--xattrs" to back that stuff up as well.
>
> -Wayne

Actually, a quick check of Gnu tar 1.15.1 shows it doesn't backup/restore
ACLs and EAs correctly. You should use "star" instead:

$ star -cv f=dir.tar --acl --xattr --xfflags artype=exustar dir

Which backups up everything in directory dir, including ACLs, EAs, and
any ext[234] attributes, to the archive "dir.tar". To restore:

$ star -xvp --acl --xattr --xfflags f=dir.tar

-Wayne