Downgrade postgresql 9.1.4 to postgresql 8.4.12 – Centos 5

aggiornamento 2012 maggio

postgresql  vai a:  PostgreSQL nel blog 

downgrade di postgresql dalla versione 9.1.4 alla 8.1.12 su server Centos 5 e necessario disporre di un backup ( dumpall ) del server postgresql.

mkdir /home/pgbck
chown postgres:postgres /home/pgbck
su - postgres
pg_dumpall > /home/pgbck/dumpalldb.sql
per avere solo le impostazioni globals 
pg_dumpall --globals-only > /home/pgbck/globals.sql

si può usare questo script per il backup dei singoli db

passiamo a root con su –

fermiamo il server con

service postgresql-9.1 stop

rinominiamo a scopo precauzionale il cluster della versione  9.1

mv /var/lib/pgsql/9.1 /var/lib/pgsql/9.1.old

rimuoviamo la versione 9.1

yum remove postgresql*

Adesso editiamo il file /etc/yum.repos.d/CentOS-Base.repo e commentiamo la riga  exclude=postgresql* che era stata inserita nella sezione upgrades per consentire installazione della versione postgresql 9.1

# exclude=postgresql*’

possiamo anche disinstallare il repo di postgres91 con

rpm -e  pgdg-centos92-9.1 ……

quindi svuotare e ripulire yum  con

yum clean all

quindi installiamo la versione postgresql84 per centos 5

yum install postgresql postgresql-server postgresql-contrib

inizializziamo  il server postgresql 8.4

service postgresql initdb

avviamo il server postgresql con

/etc/init.d/postgresql start

ripristinare la base dati del server sql caricare i dati dal file dumpall di backup creato

su – postgres

cd /home/pgbck

psql < dumpalldb.sql

per accedere alla console interattiva
psql

per l’elenco dei database caricati

\l

Altri post:

Terminator advanced multi terminal in ubuntu debian linux

terminator ico

terminator

Terminator ( Chris Jone and others) è  un utile strumento per consentire di avere diversi terminali in una finestra in ubuntu debain linux .  Per chi usa molti terminali è un po’ come avere a disposizione un tiling window manager . Le funzionalità supportate sono molte oltre al multi terminal in una sola finestra (split verticale e orizzontale ) consente anche il multi tabs, drag and drop. Oltre ad un numero più che confortevole di key bindings per riarrangiare i terminali offre anche la possibilità di effettuare screenshot della finestra attiva,   log completo, apertura link diretta,  comandi custom,   …

La  versione corrente  0.96 si installa con

apt-get install terminator

Uno screenshot di terminator un po’ eccessivo 5 tabs e in primo piano il tab centrale con 6 finestre e il menu contestuale

terminator - multi terminal

terminator – multi terminal


Alcune opzioni interessanti:

  • -b, –borderless
  • -H, –hidden  Hide the Terminator window by default. Its visibility can be toggled with the hide_window keyboard shortcut (Ctrl-Shift-Alt-a by default)
  • –geometry=GEOMETRY  Specifies the preferred size and position of Terminator’s window; see X(7).
  • -e, –command=COMMAND Runs the specified command instead of your default shell or profile specified command
  • -x, –execute COMMAND [ARGS] Runs the rest of the command line instead of your default shell or profile specified command.
  • –working-directory=DIR Set the terminal’s working directory

KEYBINDINGS  per controllare terminator:

  • Ctrl+Shift+O  Split terminals Horizontally.
  • Ctrl+Shift+E  Split terminals Vertically.
  • Ctrl+Shift+Right Move parent dragbar Right.
  • Ctrl+Shift+Left  Move parent dragbar Left.
  •  Ctrl+Shift+Up Move parent dragbar Up.
  •  Ctrl+Shift+Down Move parent dragbar Down.
  • Ctrl+Shift+S Hide/Show Scrollbar.
  • Ctrl+Shift+F Search within terminal scrollback
  • Ctrl+Shift+N or Ctrl+Tab Move to next terminal – same tab,
  • Ctrl+PageDown to move to the next tab. If cycle_term_tab is False, cycle within the same tab will be disabled
  • Ctrl+Shift+P or Ctrl+Shift+Tab Move to previous terminal within the same tab, use
  • Ctrl+PageUp  to move to the previous tab. If cycle_term_tab is False, cycle within the same tab will be disabled
  • Alt+Up Move to the terminal above the current one.
  • Alt+Down Move to the terminal below the current one.
  • Alt+Left Move to the terminal left of the current one.
  • Alt+Right Move to the terminal right of the current one.
  • Ctrl+Shift+C Copy selected text to clipboard
  • Ctrl+Shift+V Paste clipboard text
  • Ctrl+Shift+W Close the current terminal.
  • Ctrl+Shift+Q Quits Terminator
  • Ctrl+Shift+X Toggle between all terminals and only showing the current one(maximise).
  • Ctrl+Shift+Z Toggle between all terminals and only showing a scaled version of the current one (zoom).
  • Ctrl+Shift+T Open new tab
  • Ctrl+PageDown Move to next Tab
  • Ctrl+PageUp Move to previous Tab
  • Ctrl+Shift+PageDown Swap tab position with next Tab
  • Ctrl+Shift+PageUp Swap tab position with previous Tab
  • Ctrl+Plus (+) Increase font size. Note: this may require you to press shift, depending on your keyboard
  • Ctrl+Minus (-)  Decrease font size. Note: this may require you to press shift depending on your keyboard
  • Ctrl+Zero (0) Restore font size to original setting.
  •  F11 Toggle fullscreen
  • Ctrl+Shift+R Reset terminal state
  •  Ctrl+Shift+G Reset terminal state and clear window
  • Super+g Group all terminals so that any input sent to one of them, goes to all of them.
  • Super+Shift+G Remove grouping from all terminals.
  • Super+t Group all terminals in the current tab so input sent to one of them, goes to all terminals in the current tab.
  • Super+Shift+T Remove grouping from all terminals in the current tab.
  • Ctrl+Shift+I Open a new window (note: unlike in previous releases, this window is part of the same Terminator process)
  • Super+i Spawn a new Terminator process
  • Drag and Drop The layout can be modified by moving terminals with Drag and Drop. To start dragging a terminal, click and hold on its titlebar. Alternatively, hold down Ctrl, click and hold the
  • right mouse button. Then, **Release Ctrl**. You can now drag the terminal to the point in the layout you would like it to be.
  • The zone where the terminal would be inserted will be high lighted.

Risorse: