Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Tar permissione preservation

Removing 'p' flag from tar -c and adding it to tar -x. the 'p' flag
preserves permissions, but only works when using the -x flag with tar.
  • Loading branch information...
commit 3f8103b7986184c1437a54d23177830658c2f043 1 parent 427a086
Rusty Myers authored
Showing with 2 additions and 2 deletions.
  1. +1 −1  DS_BACKUP_DATA.sh
  2. +1 −1  DS_RESTORE_DATA.sh
2  DS_BACKUP_DATA.sh
View
@@ -166,7 +166,7 @@ do
rm -Rf "$DS_BACKUP/Library/Cache/"
fi
# Backup users with tar
- /usr/bin/tar -czpf "$DS_ARCHIVE.tar" "$DS_BACKUP" && echo -e "\tSucess: Home successfully backed up using tar" 2>/dev/null || echo -e "RuntimeAbortWorkflow: \tError: could not back up home"
+ /usr/bin/tar -czf "$DS_ARCHIVE.tar" "$DS_BACKUP" && echo -e "\tSucess: Home successfully backed up using tar" 2>/dev/null || echo -e "RuntimeAbortWorkflow: \tError: could not back up home"
RUNTIME_ABORT "RuntimeAbortWorkflow: \tError: could not back up home" "\tSucess: Home successfully backed up using tar"
# Backup Output Errors:
# tar: Removing leading '/' from member names
2  DS_RESTORE_DATA.sh
View
@@ -292,7 +292,7 @@ done
USERZ=`echo $(basename $i)|awk -F'_' '{print $1}'`
echo "Restoring $USERZ user directory with tar"
echo "Restore From: $i" "Restore To: $DS_LAST_RESTORED_VOLUME/Users/"
- /usr/bin/tar -xf "$i" -C "$DS_LAST_RESTORED_VOLUME$DS_USER_PATH/" --strip-components=3
+ /usr/bin/tar -xpf "$i" -C "$DS_LAST_RESTORED_VOLUME$DS_USER_PATH/" --strip-components=3
RUNTIME_ABORT "RuntimeAbortWorkflow: Could not restore home folder for $USERZ using tar...exiting." "\thome restored successfully"
done
# ;;
Please sign in to comment.
Something went wrong with that request. Please try again.