Tanstaafl <[email protected]> wrote: >On 2013-04-15 3:11 PM, Michael Mol <[email protected]> wrote: >> If this were me, I would set up a clean install from scratch. No, I >> wouldn't use a x86 userspace with a x64 kernel, but that's because of >> the benefits I see with the 64-bit arch, not with any issues I'd be >> aware of from using an x64 kernel with an x32 userspace. > >I understand and agree, and am doing that as we speak. > >I was just trying to get it back up and running quickly, but that >didn't >happen. > >Ok - now... is there a postgresql guy in the house? > >Can someone confirm that the command I need to use to dump the entire >pg >database for a full restore on a new/clean machine would be: > >pg_dumpall --username=username -o -f /home/myuser/mydb_backup.sql.gz > >? > >Will that get everything? > >I'm also planning on stopping pg (it is running ok, it is PHP that is >the problem), then just > >tar -pvczf /home/myuser/pg91_data.tar.gz /var/lib/postgresql/9.1/data > >will that suffice as another backup of all of the data that could be >used for restoration? > >Thanks guys... this was not a fun day...
Tanstaafl. The "pg_dumpall" command will generate SQL scripts to restore the entire datastructure and data needed to rebuild the entire database server. The SQL will not be compressed. So I would leave the .gz off the filename. You will also need the configuration files "pg_hba.conf" and "postgresql.conf". (Doing this from memory on my mobile.) Best also have a quick check on the postgresql website and mailing list. The last migration to a new server was done by backing up every database seperately using the "pg_dump" command. This made restoring simpler because the template databases already exist when the database is running. The tar-command will also get nearly everything if you kept the default locations. Restoring that should also suffice if you restore it to a 9.1 postgresql. Don't forget the files in /etc/postgresql*/ Any questions. Put them on here. I'm off to my customer soon. Should be back on email in about 1.5 hours... -- Joost Roeleveld -- Sent from my Android phone with K-9 Mail. Please excuse my brevity.

