Skip to Content
เมนู
คุณต้องลงทะเบียนเพื่อโต้ตอบกับคอมมูนิตี้
คำถามนี้ถูกตั้งค่าสถานะ
1 ตอบกลับ
5086 มุมมอง

Hello Greetings,

I got error as "Database restore error: Too much data for base64 line" when i try to restore my database. Its around 1.9 GB in size.

Please assist me to overcome this problem. Else any alternative way to restore the database through back-end.

Thank you.

อวตาร
ละทิ้ง
คำตอบที่ดีที่สุด

don't use database manager page for this. use pg tools with correct user credentials and you won't have any problem.

psql -h localhost -U username -d database -W < /path/to/dump.sql
password: ****


if you have any permission problems after importing the database from command line: you can fix them using the following commands on tables, views, sequences. good luck.



-- alter permissions [optional]

REASSIGN OWNED BY old_user TO newuser;


ALTER DATABASE old_user OWNER TO newuser;


Tables [ownership]

for tbl in `psql -qAt -c "select tablename from pg_tables where schemaname = 'public';" dbname` ; do psql -c "alter table $tbl owner to username" dbname ; done


Sequences [ownership]

for tbl in `psql -qAt -c "select sequence_name from information_schema.sequences where sequence_schema = 'public';" dbname` ; do psql -c "alter table $tbl owner to username" dbname ; done


View [ownership]

for tbl in `psql -qAt -c "select table_name from information_schema.views where table_schema = 'public';" dbname` ; do psql -c "alter table $tbl owner to username" dbname ; done



อวตาร
ละทิ้ง
Related Posts ตอบกลับ มุมมอง กิจกรรม
2
มิ.ย. 24
1628
1
ธ.ค. 23
1341
1
เม.ย. 23
1521
1
มี.ค. 23
2359
0
ธ.ค. 22
1933