Replaced cp with pax
This commit is contained in:
parent
98ad607421
commit
e95a2ea208
1 changed files with 12 additions and 9 deletions
21
ccollect.sh
21
ccollect.sh
|
@ -299,16 +299,16 @@ while [ "$i" -lt "$no_shares" ]; do
|
|||
RSYNC_EXTRA="$(cat "$c_rsync_extra")"
|
||||
fi
|
||||
|
||||
# verbosity for rsync
|
||||
if [ -f "$c_verbose" ]; then
|
||||
VERBOSE="-v"
|
||||
fi
|
||||
|
||||
# Output a summary
|
||||
if [ -f "$c_summary" ]; then
|
||||
SUMMARY="--stats"
|
||||
fi
|
||||
|
||||
# verbosity for rsync
|
||||
if [ -f "$c_verbose" ]; then
|
||||
VERBOSE="-v"
|
||||
fi
|
||||
|
||||
# MORE verbosity, includes standard verbosity
|
||||
if [ -f "$c_vverbose" ]; then
|
||||
VERBOSE="-v"
|
||||
|
@ -349,13 +349,16 @@ while [ "$i" -lt "$no_shares" ]; do
|
|||
# give some info
|
||||
echo "Beginning to backup, this may take some time..."
|
||||
|
||||
echo "Creating $destination_dir ..."
|
||||
mkdir $VVERBOSE "$destination_dir"
|
||||
|
||||
# only copy if a directory exists
|
||||
if [ "$last_dir" ]; then
|
||||
echo "$(date) Hard linking..."
|
||||
cp -al $VVERBOSE "$last_dir" "$destination_dir"
|
||||
else
|
||||
echo "Creating $destination_dir"
|
||||
mkdir $VVERBOSE "$destination_dir"
|
||||
cd "$last_dir"
|
||||
pax -r -w -l $VVERBOSE . "../$destination_dir"
|
||||
# old, gnu cp specific
|
||||
# cp -al $VVERBOSE "$last_dir" "$destination_dir"
|
||||
fi
|
||||
|
||||
if [ $? -ne 0 ]; then
|
||||
|
|
Loading…
Reference in a new issue