popovnv

Untitled

Oct 30th, 2018
163
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.63 KB | None | 0 0
  1. [postgres@bp-bull-db03 dump]$ cat dump_all_bp.sh
  2. LOG=/postgres/data/dump/dump_all_bp_`date +"%Y%m%d_%H%M%S"`.log
  3. {
  4.  
  5. #rm -rf ./dump_all_bp/*
  6.  
  7. echo "`date +"%Y%m%d_%H%M%S"`"
  8. echo "============================================"
  9.  
  10. /opt/pgpro/ent-96/bin/pg_dump -j 16 -h /tmp -n bp -v -Fd -f /postgres/data/dump/pg_dump_all_bp --exclude-table='arhivhranimyhdannyh$ref' --exclude-table='arhivhranimyhdannyh' --exclude-table='b4_file_data' --exclude-table='b4_mutex_history' --exclude-table='b4_mutexes' --exclude-table='b4_report_file' --exclude-table='b4_signature_verify_log' --exclude-table='b4_temp_file' --exclude-table='bp_department_organ_auths' --exclude-table='bp_manag_task' --exclude-table='bp_message' --exclude-table='bp_message_log' --exclude-table='bp_message_log_user' --exclude-table='bp_message_user' --exclude-table='bp_task_history' --exclude-table='bp_task_history_record' --exclude-table='bp_user_action_history' --exclude-table='bp_user_ui_param' --exclude-table='descriptionzayavki$ref' --exclude-table='descriptionzayavki' --exclude-table='eas_document_content' --exclude-table='eas_log_entity_prop' --exclude-table='execution_result' --exclude-table='form_data' --exclude-table='form_data_addition' --exclude-table='form_data_archive' --exclude-table='form_history$ref' --exclude-table='form_history' --exclude-table='form_log' --exclude-table='form_meta_description' --exclude-table='gz_dep_info_okved' --exclude-table='hranimrezulpro$ref' --exclude-table='hranimrezulpro' --exclude-table='iekspertizadannyh$ref' --exclude-table='iekspertizadannyh' --exclude-table='iekspertizaformy$ref' --exclude-table='iekspertizaformy' --exclude-table='iekspertizazayavki$ref' --exclude-table='iekspertizazayavki' --exclude-table='soobschenieeksperta$ref' --exclude-table='soobschenieeksperta' --exclude-table='storedformdata$ref' --exclude-table='storedformdatafile$ref' --exclude-table='storedformdatafile' --exclude-table='storedprintform' --exclude-table='svody_cells' --exclude-table='svody_free_cells' --exclude-table='svody_rows' --exclude-table='t_gz_department_info' --exclude-table='t_gz_department_info_g' --exclude-table='t_gz_department_info_r' --exclude-table='temp_sbr_uz_pi_ievent_ip_sum' --exclude-table='tmp_alternate_id_2014_08_24' --exclude-table='tmp_del' --exclude-table='tmp_fk_account' --exclude-table='tmp_fv' --exclude-table='tmp_kont' --exclude-table='tmp_mon_20' --exclude-table='tmp_oktmo' --exclude-table='tmp_oktmo2' --exclude-table='tmp_otv' --exclude-table='tmp_pd_inc_src_template' --exclude-table='tmp_regulation' --exclude-table='tmp_user' --exclude-table='tmp_user_snl' --exclude-table='tmp_ver' --exclude-table='xx_dep_service_list' --exclude-table='xx_fin_vol_20_1' --exclude-table='xx_financial_volume_20' --exclude-table='xx_financial_volume_27' --exclude-table='xx_foiv_agreement_section' --exclude-table='xx_oktmo' --exclude-table='xx_ot_2206' --exclude-table='xx_registry_record' --exclude-table='xx_sbr_uz_purchase_rro' --exclude-table='xx_sbr_uz_purchase_rro_ba_242' --exclude-table='xx_snils' --exclude-table='xx_subsidy' --exclude-table='xx_subsidy_ot_2' --exclude-table='xx_tsk417_edition' --exclude-table='xx_uz_purch_rro_ba_242_npa' --exclude-table='xx_uz_purch_rro_ba_fed_npa' --exclude-table='zapisistoriiiekspert$ref' --exclude-table='zapisistoriiiekspert' --exclude-table-data='bp.arhivhranimyhdannyh' bp
  11.  
  12.  
  13. #/opt/pgpro/ent-96/bin/pg_dump -h /tmp -v -b -Fd -f /postgres/data/dump/all --table='b4_file_data' bp
  14.  
  15. echo "============================================"
  16. echo "`date +"%Y%m%d_%H%M%S"`"
  17.  
  18. # su - postgres -c "/usr/pgsql-10/bin/pg_restore -h /tmp --dbname thesis --role "thesis" --no-password --verbose "/tmp/thesis""
  19.  
  20. } >> $LOG 2>&1
Advertisement
Add Comment
Please, Sign In to add comment