selinux backups
Good afternoon.
Wich is the best way to make a backup of a system running lvm and selinux ?
It seems that with lvm systems, the best way is to take a snapshot (wich seems a waste
of space in a Volume Group). But with Selinux ? tar-1.15 doesn't apply the right
permissions when extracting (at least of what I tested).
I've bee using "dump" for a while, and I tested it right now and it preserves the "extended attributes" so it seems to be the right option for me since the scripts I'm using, use "dump" Is it possible/preferable to use tar or star ?
Thanks.
Regards
David
Quoted 4 lines · david carvalho
Good afternoon.
Wich is the best way to make a backup of a system running lvm and selinux ?
It seems that with lvm systems, the best way is to take a snapshot
Quoted 8 lines
(wich seems a waste
of space in a Volume Group). But with Selinux ? tar-1.15 doesn't apply the right
permissions when extracting (at least of what I tested). I've bee using "dump" for a while, and I tested it right now and it preserves the "extended attributes" so it seems to be the right option for me since the scripts I'm using, use "dump"
Is it possible/preferable to use tar or star ?
What's your distribution and release? star was the first to support preserving xattrs and selinux, dump/restore later added support, and I think that even tar now has support at least in Fedora.
Signature · 8 lines
Stephen Smalley National Security Agency -- This message was distributed to subscribers of the selinux mailing list. If you no longer wish to subscribe, send mail to [email protected] with the words "unsubscribe selinux" without quotes as the message.
Hi,
I checked some backup program for writing selinux article;
http://www.atmarkit.co.jp/fsecurity/rensai/selinux202/selinux01.html
(Available on next week, but it has Japanese character only.)
Current dump/restore and star are supporting SELinux. If you want to use "cp", you have to use "-c" option for copying xattrs.
Also, I couldn't take xattrs by "tar" and "rsync" on CentOS4.4. I didn't check "tar" on Fedora, so it might be able to take xattr. I don't know how we can take xattr with "rsync":-(
Regards,
OMO
Quoted 28 lines · Stephen Smalley
Quoted 4 lines · david carvalho
Good afternoon.
Wich is the best way to make a backup of a system running lvm and selinux ?
It seems that with lvm systems, the best way is to take a snapshotQuoted 8 lines
(wich seems a waste
of space in a Volume Group). But with Selinux ? tar-1.15 doesn't apply the right
permissions when extracting (at least of what I tested). I've bee using "dump" for a while, and I tested it right now and it preserves the "extended attributes" so it seems to be the right option for me since the scripts I'm using, use "dump"
Is it possible/preferable to use tar or star ?What's your distribution and release? star was the first to support preserving xattrs and selinux, dump/restore later added support, and I think that even tar now has support at least in Fedora.
Signature · 8 lines
Stephen Smalley National Security Agency -- This message was distributed to subscribers of the selinux mailing list. If you no longer wish to subscribe, send mail to [email protected] with the words "unsubscribe selinux" without quotes as the message.
Signature · 10 lines
Kazuki Omo: [email protected] LIDS Japanese Information: Japanese: http://www.selinux.gr.jp/LIDS-JP/index.html English: http://www.selinux.gr.jp/LIDS-JP/LIDS_en/index.html Diary: http://omok.livejournal.com -- This message was distributed to subscribers of the selinux mailing list. If you no longer wish to subscribe, send mail to [email protected] with the words "unsubscribe selinux" without quotes as the message.
Quoted 6 lines · david carvalho
Good afternoon.
Wich is the best way to make a backup of a system running lvm and selinux ? It seems that with lvm systems, the best way is to take a snapshot (wich seems a waste of space in a Volume Group). But with Selinux ? tar-1.15 doesn't apply the right permissions when extracting (at least of what I tested).
Create a file that contains zeros using most of the free space on the filesystem in question (EG dd from /dev/zero) and then unlink it. Then gzip compress the filesystem, the zero blocks will compress well.
For my laptop I use cryptsetup to encrypt the LVM volumes so I can't usefully compress them (encrypted data is almost uncompressable), but this does give me encrypted backups which I consider useful.
Signature · 9 lines
[email protected] http://etbe.coker.com.au/ My Blog http://www.coker.com.au/sponsorship.html Sponsoring Free Software development -- This message was distributed to subscribers of the selinux mailing list. If you no longer wish to subscribe, send mail to [email protected] with the words "unsubscribe selinux" without quotes as the message.
Quoted 6 lines · Kazuki Omo
Hi,
I checked some backup program for writing selinux article;
http://www.atmarkit.co.jp/fsecurity/rensai/selinux202/selinux01.html
(Available on next week, but it has Japanese character only.)
Quoted 7 lines
Current dump/restore and star are supporting SELinux. If you want to use "cp", you have to use "-c" option for copying xattrs.
Also, I couldn't take xattrs by "tar" and "rsync" on CentOS4.4. I didn't check "tar" on Fedora, so it might be able to take xattr. I don't know how we can take xattr with "rsync":-(
Try rsync -X or --xattrs. Requires a modern version of rsync though.
Signature · 8 lines
Stephen Smalley National Security Agency -- This message was distributed to subscribers of the selinux mailing list. If you no longer wish to subscribe, send mail to [email protected] with the words "unsubscribe selinux" without quotes as the message.