• Home
  • Services
    • HR Services
      • HR Advisory Services
      • Contract Staffing
      • HR Outsourcing Services
      • Manpower Supply Services
      • Payroll Processing
      • Permanent Placement
      • Recruitment and Placement Services
      • Recruitment Process Outsourcing
      • Staffing Agency Services
    • DBA Support
      • DBA Consultancy Services
      • PostgreSQL Support
    • Website Maintenance
    • Company Registration Services
    • Virtual Office Space Address
  • Company
    • FAQs
    • About Us
    • Contact
  • Office Space
    • Virtual Space
    • Co-working Space
    • Private Space
    • Meeting Room
    • Locations
    • Add Listing
    • Dashboard
  • Blogs
  • Careers
    • Jobseeker
    • Employer
  • Courses

    About Courses

    • List Of Courses
    • Become an Instructor
    Greenplum

    Greenplum

    $1,500.00
    Read More
    Have any question?
    (+91)8148383856
    info@rayafeel.com
    Login
    RayaFeeL
    • Home
    • Services
      • HR Services
        • HR Advisory Services
        • Contract Staffing
        • HR Outsourcing Services
        • Manpower Supply Services
        • Payroll Processing
        • Permanent Placement
        • Recruitment and Placement Services
        • Recruitment Process Outsourcing
        • Staffing Agency Services
      • DBA Support
        • DBA Consultancy Services
        • PostgreSQL Support
      • Website Maintenance
      • Company Registration Services
      • Virtual Office Space Address
    • Company
      • FAQs
      • About Us
      • Contact
    • Office Space
      • Virtual Space
      • Co-working Space
      • Private Space
      • Meeting Room
      • Locations
      • Add Listing
      • Dashboard
    • Blogs
    • Careers
      • Jobseeker
      • Employer
    • Courses

      About Courses

      • List Of Courses
      • Become an Instructor
      Greenplum

      Greenplum

      $1,500.00
      Read More

      Blog

      • Home
      • Blog
      • Blog
      • Taking PostgreSQL Procedure & Function backup with Seperate File

      Taking PostgreSQL Procedure & Function backup with Seperate File

      • Posted by 2ndnijam
      • Categories Blog
      • Date January 4, 2019
      • Comments 0 comment

      In this shell script will help you to take the backup of postgresql function & procedure with different file as schema based

      # Config:
      DB="tutorialdb"
      U=enterprisedb
      export PGPASSWORD="tcs@345"
      export PGPORT="5444"
      export PGHOST="20.0.4.101"
      nijam="/home/Admin/"
      logfile="nijam48".sql
      
      /opt/edb/as9.6/bin/psql -d $DB -U $U -t -c "SELECT FORMAT(
      '\COPY (SELECT regexp_split_to_table(regexp_replace(pg_get_functiondef(%s), ''\t'', ''   '', ''g''), ''\n'')) TO  /home/Admin/2ndquadrant.in/HealthCraft_DC/schemas/security/functions_procedures/security.%s',
      pp.oid,
      pp.proname
      )
      from pg_proc pp
      inner join pg_namespace pn on (pp.pronamespace = pn.oid)
      inner join pg_language pl on (pp.prolang = pl.oid)
      WHERE PN.NSPNAME = 'security'" >>$nijam/$logfile 2>&1
      /opt/edb/as9.6/bin/psql -d $DB -U $U -t -c "\i /home/Admin/nijam48.sql"
      # Successfully completed the procedure & function backup

      Note : Here security is the schema name tutorialdb is the database name so you can change the database and schema name as per your postgres procedure & function backup strategy. nijam48.sql is the temporary sql file

      FOR IT Related SUPPORT

      • Share:
      2ndnijam

      Previous post

      How to restore the postgresql database dump at real time production environment ?
      January 4, 2019

      Next post

      Taking PostgreSQL VIEWS backup with Seperate File
      January 4, 2019

      Leave A Reply

      You must be logged in to post a comment.

      Connect with



      Search

      ADVERTISEMENT

      Latest Posts

      HOW VIRTUAL OFFICE IS GOING TO CHANGE YOUR BUSINESS STRATEGIES
      21Jun2022
      Take the best advantage of your Virtual Office
      21Jun2022
      Let’s discuss how corporates can improve their productivity through virtual office spaces?
      21Jun2022
      Virtual Office Space & Address Services
      21Jun2022
      HOW VIRTUAL OFFICES ARE TRANSFORMING BUSINESSES
      21Jun2022
      PostgreSQL

      PostgreSQL

      $800.00 $500.00
      Greenplum

      Greenplum

      $1,500.00
      Oracle Database

      Oracle Database

      $350.00
      2ndquadrant.in

      (+91) 8838953252

      ITsupport@rayafeel.com

      Company

      • About Us
      • Our Team

      COURSES

      • List Of Course
      • Become An Instructor

      Support

      • DBA Support
      • Consultancy Services

      Recommend

      • Login
      • Contact Us

      IT Services by rayafeel.com. Powered by Rayafeel Technologies Pvt Ltd.

      • Privacy
      • Terms

      Become An Instructor?

      Join thousand of instructors and earn money hassle free!

      Get Started Now

      Connect with

      Login with Google

      Login with your site account

      Connect with



      Lost your password?