bug fix
This commit is contained in:
parent
979488b062
commit
6cbc0f6047
@ -17,7 +17,6 @@ mkdir -p ${TmpDir}
|
||||
Qcow2Files=$(find ${Qcow2Dir} -type f -name "*.qcow2" -mtime -1 -print)
|
||||
echo "Files to compress:"
|
||||
echo ${Qcow2Files}
|
||||
exit
|
||||
|
||||
for file in ${Qcow2Files}
|
||||
do
|
||||
@ -53,12 +52,20 @@ do
|
||||
echo "Compression is successful. Compression ratio is ${ratio}%"
|
||||
rm ${SparseFile}
|
||||
|
||||
## ***************************************************************************
|
||||
##
|
||||
GuestFile="${ShrunkFile#*.}"
|
||||
GuestFile="${GuestFile%.shrunk}"
|
||||
Cmd="ln -snf ${ShrunkFile} /opt/vm_drive/${GuestFile}"
|
||||
echo ${Cmd}
|
||||
eval ${Cmd}
|
||||
## Switching symlink will mask latest changes for future backups
|
||||
## if VM was not restarted.
|
||||
## This must be done manually before restarting - pick the latest shrunk
|
||||
## symlink it and restart VM
|
||||
##
|
||||
## ***************************************************************************
|
||||
|
||||
# GuestFile="${ShrunkFile#*.}"
|
||||
# GuestFile="${GuestFile%.shrunk}"
|
||||
# Cmd="ln -snf ${ShrunkFile} /opt/vm_drive/${GuestFile}"
|
||||
# echo ${Cmd}
|
||||
# eval ${Cmd}
|
||||
##
|
||||
Cmd="chown oleg:oleg ${ShrunkFile}"
|
||||
echo ${Cmd}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user