Your Name il y a 3 ans
Parent
commit
50f547fda9
2 fichiers modifiés avec 9 ajouts et 2 suppressions
  1. 1 0
      backup/restore_backup.sh
  2. 8 2
      backup/upload_bootstrap.sh

+ 1 - 0
backup/restore_backup.sh

@@ -128,6 +128,7 @@ then
 sudo mv /usr/local/bin/okcashd_old /usr/local/bin/okcashd | true
 okcashd
 fi
+echo "okcash restart"
 }
 
 function download_ {

+ 8 - 2
backup/upload_bootstrap.sh

@@ -130,9 +130,15 @@ echo -e "\n\e[95mPacking & Compressing Files :\e[0m"
 cd /home/$USER
 SIZE1=`du -sk /home/$USER/.okcash/blk0001.dat | cut -f 1`
 SIZE2=`du -sk /home/$USER/.okcash/txleveldb/ | cut -f 1`
-SIZE=$(($SIZE2+$SIZE1+1))
+SIZE=$(($SIZE2+$SIZE1))
+#HSIZE=$(echo $SIZE | tail -1 | awk {'print $1'} | awk '{ total = $1 / 1024 ; print total "MB" }')
+#echo -e "Folder size before compression : $HSIZE\n"
+
 echo -e "\e[97mTar & PiXz :\e[0m"
-tar cf - .okcash/txleveldb/* .okcash/blk0001.dat | pv -s ${SIZE}k | pixz  > bootstrap.tar.xz
+tar cf - .okcash/blk0001.dat .okcash/txleveldb/* | pv -s ${SIZE}k | pixz  > bootstrap.tar.xz
+#FSIZE=`du /home/$USER/bootstrap.tar.xz| tail -1 | awk {'print $1'} | awk '{ total = $1 / 1024 ; print total "MB" }'`
+#echo -e "Folder size after compression : $FSIZE\n"
+#echo -e "Gain ratio: ($FSIZE/$HSIZE)*100" | bc -l
 sleep 1
 
 echo -e "\n\e[95mSplitting Files (${split_size}M):\e[0m"