Hi, using flexbackup 1.2.1 with "star", I wasn't able to restore correct UIDs, GIDs and ACLs for the directories contained in the created archives. I guess this could be due to the "-dirmode" flag passed to star and to the "-depth" flag passed to find. I attach a small patch that should help.
Ciao, Marco -- Marco Pantaleoni elastiC language developer http://www.elasticworld.org
diff -Naur flexbackup-1.2.1.orig/flexbackup flexbackup-1.2.1.modified/flexbackup
--- flexbackup-1.2.1.orig/flexbackup 2003-10-10 16:12:09.000000000 +0200
+++ flexbackup-1.2.1.modified/flexbackup 2005-09-14 20:05:36.000000000 +0200
@@ -1462,7 +1462,7 @@
$cmd .= "-l ";
$cmd .= "-D ";
$cmd .= "-B ";
- $cmd .= "-dirmode ";
+ $cmd .= "$::star_dirmode_flag ";
if ($cfg::label ne 'false') {
$cmd .= "VOLHDR=\"$title\" ";
}
@@ -2073,6 +2073,8 @@
}
$cmd .= "-p ";
$cmd .= "$::star_fifo_flag ";
+ $cmd .= "$::star_xdir_flag ";
+ $cmd .= "$::star_acl_flag ";
$cmd .= "$::star_verb_flag ";
$cmd .= "$::star_sparse_flag ";
$cmd .= "$::star_blocknum_flag ";
@@ -2724,6 +2726,7 @@
&checkvar(\$cfg::staticlogs,'staticlogs','bool','false');
&checkvar(\$cfg::prefix,'prefix','exist','');
&checkvar(\$cfg::sprefix,'sprefix','exist','');
+ &checkvar(\$cfg::usedepth,'use_depth','bool','false');
if (@::errors) {
print $::msg "Errors:\n";
@@ -3332,6 +3335,8 @@
} elsif ($cfg::type eq 'star') {
+ &checkvar(\$cfg::star_dirmode,'star_dirmode','bool','false');
+ &checkvar(\$cfg::star_xdir,'star_xdir','bool','true');
&checkvar(\$cfg::star_acl,'star_acl','bool','true');
&checkvar(\$cfg::star_fifo,'star_fifo','bool','true');
&checkvar(\$cfg::star_format,'star_format','tar star gnutar ustar pax xstar xustar exustar suntar','exustar');
@@ -3348,6 +3353,20 @@
}
}
+ # star dirmode flag
+ if ($cfg::star_dirmode eq "true") {
+ $::star_dirmode_flag = "-dirmode";
+ } else {
+ $::star_dirmode_flag = "";
+ }
+
+ # star xdir flag
+ if ($cfg::star_xdir eq "true") {
+ $::star_xdir_flag = "-xdir";
+ } else {
+ $::star_xdir_flag = "";
+ }
+
# ACL flag
if ($cfg::star_acl eq "true") {
$::star_acl_flag = "-acl";
@@ -4858,7 +4877,9 @@
# Can't use find -depth with -prune (see single unix spec etc)
# (not toally required anyway, only if you are archiving dirs you
# don't have permissions on and are running as non-root)
- $cmd .= "-depth ";
+ if ($cfg::usedepth eq 'true') {
+ $cmd .= "-depth ";
+ }
}
$cmd .= "$::mountpoint_flag ";
diff -Naur flexbackup-1.2.1.orig/flexbackup.conf flexbackup-1.2.1.modified/flexbackup.conf
--- flexbackup-1.2.1.orig/flexbackup.conf 2003-09-22 00:59:58.000000000 +0200
+++ flexbackup-1.2.1.modified/flexbackup.conf 2005-09-14 20:05:02.000000000 +0200
@@ -173,12 +173,27 @@
# Handle ACLs?
$star_acl = 'true';
+# star '-dirmode'
+# default was 'false' before, but it seems that ACLs on directories
+# don't get set correctly on extraction if this flag is present.
+$star_dirmode = 'false'; # default was true before, but ACLs seems
+
+# star '-xdir'
+# (this didn't exist before, but it seems that ACLs on directories
+# require this flag).
+$star_xdir = 'true'; # default was false before
+
# Format of star archive
$star_format = 'exustar';
# True to show block numbers
$star_echo_block_num = 'false';
+# find '-depth' flag
+# omit it to correctly save/restore permissions and/or ACLs for
+# directories
+$use_depth = 'false';
+
# ----------------------------------------------------------------------
# Parameters for 'pax' only
pgpwnvUCiw0VY.pgp
Description: PGP signature
