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")"
|
RSYNC_EXTRA="$(cat "$c_rsync_extra")"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# verbosity for rsync
|
|
||||||
if [ -f "$c_verbose" ]; then
|
|
||||||
VERBOSE="-v"
|
|
||||||
fi
|
|
||||||
|
|
||||||
# Output a summary
|
# Output a summary
|
||||||
if [ -f "$c_summary" ]; then
|
if [ -f "$c_summary" ]; then
|
||||||
SUMMARY="--stats"
|
SUMMARY="--stats"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
# verbosity for rsync
|
||||||
|
if [ -f "$c_verbose" ]; then
|
||||||
|
VERBOSE="-v"
|
||||||
|
fi
|
||||||
|
|
||||||
# MORE verbosity, includes standard verbosity
|
# MORE verbosity, includes standard verbosity
|
||||||
if [ -f "$c_vverbose" ]; then
|
if [ -f "$c_vverbose" ]; then
|
||||||
VERBOSE="-v"
|
VERBOSE="-v"
|
||||||
|
@ -349,13 +349,16 @@ while [ "$i" -lt "$no_shares" ]; do
|
||||||
# give some info
|
# give some info
|
||||||
echo "Beginning to backup, this may take some time..."
|
echo "Beginning to backup, this may take some time..."
|
||||||
|
|
||||||
|
echo "Creating $destination_dir ..."
|
||||||
|
mkdir $VVERBOSE "$destination_dir"
|
||||||
|
|
||||||
# only copy if a directory exists
|
# only copy if a directory exists
|
||||||
if [ "$last_dir" ]; then
|
if [ "$last_dir" ]; then
|
||||||
echo "$(date) Hard linking..."
|
echo "$(date) Hard linking..."
|
||||||
cp -al $VVERBOSE "$last_dir" "$destination_dir"
|
cd "$last_dir"
|
||||||
else
|
pax -r -w -l $VVERBOSE . "../$destination_dir"
|
||||||
echo "Creating $destination_dir"
|
# old, gnu cp specific
|
||||||
mkdir $VVERBOSE "$destination_dir"
|
# cp -al $VVERBOSE "$last_dir" "$destination_dir"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [ $? -ne 0 ]; then
|
if [ $? -ne 0 ]; then
|
||||||
|
|
Loading…
Reference in a new issue