• 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
  • Locations
  • Blogs
    • Blog
    • Blog – PostgreSQL Support
    • Blog – PostgreSQL Migration
    • Blog – All DB’s
    • Blog – Linux
  • Courses

    About Courses

    • List Of Courses
    • Become an Instructor
    Greenplum

    Greenplum

    $1,500.00
    Read More
    Have any question?
    (+91)8838953252
    ITsupport@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
    • Locations
    • Blogs
      • Blog
      • Blog – PostgreSQL Support
      • Blog – PostgreSQL Migration
      • Blog – All DB’s
      • Blog – Linux
    • Courses

      About Courses

      • List Of Courses
      • Become an Instructor
      Greenplum

      Greenplum

      $1,500.00
      Read More

      Taking PostgreSQL SEQUENCE Definition backup with their table File name

      • Home
      • Taking PostgreSQL SEQUENCE Definition backup with their table File name

      Taking PostgreSQL SEQUENCE Definition backup with their table File name

      • Posted by 2ndnijam
      • Date January 4, 2019

      In this shell script will help you to take the backup of postgresql sequence definition with different or individual file name as schema based.

      # Config:
      DB="postgres"
      U=enterprisedb
      export PGPASSWORD="tcs@345"
      export PGPORT="5444"
      export PGHOST="20.0.4.101"
      
      TABLES="$(/opt/edb/as9.6/bin/psql -d $DB -U $U -t -c "SELECT sequence_name FROM information_schema.sequences WHERE sequence_schema ='mm'")"
      for table in $TABLES; do
        echo backup $table ...
      /opt/edb/as9.6/bin/pg_dump -d $DB -U $U -w -st mm.$table > /home/Admin/2ndquadrant.in/HealthCraft_DC/schemas/mm/sequences/mm.$table;
      done;
      cd /home/Admin/2ndquadrant.in/HealthCraft_DC/schemas/mm/tables
      ls -lh
      echo done

      Note : Here mm is the schema name postgres is the database name so you can change the database and schema name as per your postgres sequence backup strategy.

      FOR IT Related SUPPORT

      Contact Us

      Fields with (*) are compulsory.

      • Share:
      2ndnijam

      Previous post

      remote DBA services, offer PostgreSQL support
      January 4, 2019

      Next post

      Postgres database cloud Migration by using crontab job sheduler
      January 4, 2019

      Search

      ADVERTISEMENT

      Latest Posts

      Tips to Choose the Best Serviced Office for Your Business
      24May2022
      What key considerations do you need to keep in mind when choosing a new serviced office to house your business?
      24May2022
      The Benefits of Coworking
      24May2022
      The Long-Term Impact of Coworking
      24May2022
      Are you spending more money than you earn? Outsource with Ease and Move When You’re Ready
      24May2022
      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 Twitter Login with Linkedin Login with Windowslive Login with Yahoo

      Login with your site account

      Connect with



      Lost your password?