anchor.diff:  
   
   until [  $COUNTER -lt 1 ]; do
  -    {#try
  +    { #try
       python drivesink.py upload "backuping" <%= fetch(:backupDestinationFolder) || "backups/firstdedic-server/" + fetch(:application)  %> -c /home/kobe/.drivesink #>> log/backup.log 2>&1
  -    } || {  #catch
  -    	has_error=1;
  -    	error_text="Ошибка во время исполнения скрипта загрузки файлов в хранилище";
  +    } || { 
  +      has_error=1;
  +      error_text="Cannot upload files";
       }
       if [ $? -eq 0 ]; then
         COUNTER=0
  
positive.code: <%= fetch(:slack_hook) %>
  
  #telegram notification
  curl -i -X GET "https://api.telegram.org/bot<%= fetch(:backup_telegram_bot_hash) %>/sendMessage?chat_id=<%= fetch(:backup_telegram_chat_id) %>&text=Произошла ошибка при создании бэкапа для <%= fetch(:application) %>"
  
  fi
  
  
negative.code: password=$(cat config/database.yml | grep password | sed s/password://g | xargs)
  database=$(cat config/database.yml | grep database | sed s/database://g | xargs)
  
  if grep "localhost:5432:$database:$username:$password" ~/.pgpass; then 
     echo "pg config exists"     
  else 
     echo "localhost:5432:$database:$username:$password" >> ~/.pgpass;  
     chmod 600 ~/.pgpass
  fi
  
  {
    pg_dump -h localhost -U $username -d $database -f backuping/version-$curdate/<%=fetch(:stage)%>.sql
  } || {
    has_error=1
    error_text="PG dump error"
  }
  fi
  
  