• Unfortunately, we have experienced significant hard drive damage that requires urgent maintenance and rebuilding. The forum will be a state of read only until we install our new drives and rebuild all the configurations needed. Please follow our Facebook pagefor updates, or we will be back up shortly! (The forum could go offline at any given time due to the nature of the failed drives whilst awaiting the upgrades.)

Backup for databases test

Junior Spellweaver
Joined
Sep 28, 2020
Messages
143
Reaction score
27
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.
 
Joined
Jan 24, 2007
Messages
652
Reaction score
324
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
 
Junior Spellweaver
Joined
Sep 28, 2020
Messages
143
Reaction score
27
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.
 
Back
Top