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