Tag Archives: backup

Postgresql : moving data from windows to linux

I was trying to move my database from Windows server to Linux server. I thought it will be a simple process. But, it is not. It took backup from windows server via pgAdmin III. and tried to restore the backup to linux server via command line.

pg_restore -d dbname -U username -C /home/back1.backup

Then I got peer authentication error. so i fixed my pg_hba.conf file. It was

local   all             all                                     peer

I changed it to

local   all             all                                     trust

Then again I tried to run restore command. I got the following error.

pg_restore: [archiver (db)] Error while PROCESSING TOC:
pg_restore: [archiver (db)] Error from TOC entry 2021; 1262 16483 DATABASE dbname dbname
pg_restore: [archiver (db)] could not execute query: ERROR: invalid locale name: “English_United States.1252”
Command was: CREATE DATABASE dbname WITH TEMPLATE = template0 ENCODING = ‘UTF8’ LC_COLLATE = ‘English_United States.1252’ LC_CTYPE = ‘Engli…
WARNING: errors ignored on restore: 1

Read more of this post


Automated Postgres database backup on CentOS

My application is running on Postgres. Now, I’m planning to take daily backup of my database.

So, far I have learned from using PgAdmin III, I can take back up using the backup tool. Its a easy process. Open PgAdmin III, connect to the database server. Right click on the db name and click backup. Save the back up file and it is done. But, I couldn’t find anything, that I can create a schedule and it will take back up according to the schedule.

Read more of this post