Backup for databases test

Results 1 to 3 of 3
  1. #1
    Registered wallacekos is offline
    MemberRank
    Sep 2020 Join Date
    23Posts

    Backup for databases test

    Backup for databases test
    hi all, im testing server in local host.
    need make a backup fpr databases for put in VPS machine...

    any ideia for this?

    tank you.


  2. #2
    Account Upgraded | Title Enabled! yokohiro is offline
    True MemberRank
    Jan 2007 Join Date
    NarniaLocation
    708Posts

    Re: Backup for databases test

    Quote Originally Posted by wallacekos View Post
    hi all, im testing server in local host.
    need make a backup fpr databases for put in VPS machine...

    any ideia for this?

    tank you.

    01 - "use postgres" in the console...

    02 - making files backup from database
    Code:
    pg_dump ffaccount > ffaccount.bak
    pg_dump ffdb1 > ffdb1.bak
    pg_dump ffmember > ffmember.bak
    ps: after make backup, look root folder, contain your files database backup.

    03 - restaure database files backup
    Code:
    createdb -T template0 ffaccount
    psql ffaccount < ffaccount.bak
    
    createdb -T template0 ffdb1
    psql ffdb1 < ffdb1.bak
    
    createdb -T template0 ffmember
    psql ffmember < ffmember.bak
    if u have any this database, need delete then before restaure files.

    enjoy

  3. #3
    Registered wallacekos is offline
    MemberRank
    Sep 2020 Join Date
    23Posts

    Re: Backup for databases test

    Quote Originally Posted by yokohiro View Post
    01 - "use postgres" in the console...

    02 - making files backup from database
    Code:
    pg_dump ffaccount > ffaccount.bak
    pg_dump ffdb1 > ffdb1.bak
    pg_dump ffmember > ffmember.bak
    ps: after make backup, look root folder, contain your files database backup.

    03 - restaure database files backup
    Code:
    createdb -T template0 ffaccount
    psql ffaccount < ffaccount.bak
    
    createdb -T template0 ffdb1
    psql ffdb1 < ffdb1.bak
    
    createdb -T template0 ffmember
    psql ffmember < ffmember.bak
    if u have any this database, need delete then before restaure files.

    enjoy

    very very tank you @yokohiro, work fine.



Advertisement