Archive for the ‘Thoughts’ Category.
2011/08/23, 16:13
e.g. for testing purposes before touching valuable data…
- set the DB names
ORIG_DB="orig_db_name"
NEW_DB="new_db_name" |
- create a dump (make sure to use a user having access rights to the db)
TSTAMP=$(date +%F_%H-%M)
FILE_ORIG="${ORIG_DB}_${TSTAMP}.sql"
pg_dump -f ${FILE_ORIG} --blobs --create ${ORIG_DB} |
- adjust the DB name in the dump and check everything went ok (the diff should be just in CREATE, ALTER and \connect statements)
FILE_NEW="${NEW_DB}_based-on_${ORIG_DB}_${TSTAMP}.sql"
sed "s/${ORIG_DB}/${NEW_DB}/g" ${FILE_ORIG} > ${FILE_NEW}
vimdiff ${FILE_ORIG} ${FILE_NEW} |
- adjust permissions for the new db (add the new DB name to the desired user(s)) and reload the postgres config
sudo vim /etc/postgresql/8.4/main/pg_hba.conf
sudo /etc/init.d/postgresql-8.4 reload |
- load the new DB’s SQL-code into postgres
- to set identical permissions on the new DB, create a full dump using pg_dumpall, check the GRANT commands in the dump and apply them to the new DB as well…
2011/08/01, 18:04
wow: http://bodensee-navigationskarte.scbh.at/
2011/06/07, 18:19
This posting describes the steps required to build the Funambol add-on for Mozilla Thunderbird 3 on Ubuntu 10.10 (Maverick Meerkat). It is mostly based on Bas’ Blog entry .
Part I: the prerequisites
- define the buildroot
BASE="${HOME}/buildenvs/mozbuild.maverick_amd64" |
- install required packages
sudo aptitude install mercurial autoconf2.13 colormake libcurl4-gnutls-dev libtool git-svn |
- I had problems using a freshly debootstrapped ubuntu maverick (10.10) chroot that was missing the “
staff“ group, so if it’s missing, add it via “vigr“…
- install build-dependencies
sudo apt-get build-dep thunderbird |
Continue reading ‘building the Funambol extension for TB3 on Linux/x86-64’ »
2011/05/03, 15:13
a short cheat sheet of commands I used several times to migrate SVN-repositories to GIT…
- preparation
sudo aptitude install subversion git-svn
svn co https://my.server.private/repos/my_repo
cd my_repo
svn log -q | grep -v '^--*$' | cut -d '|' -f 2 | sort | uniq > ../my_repo_authors.txt
cd ..
vim my_repo_authors.txt
### go ahead and edit the authors file |
- git-svn clone the subversion repository
### use "--no-metadata" only if you don't want the git-svn-id tags in the commit-messages
git svn clone --no-metadata --stdlayout \
--authors-file=my_repo_authors.txt \
https://my.server.private/repos/my_repo \
my_repo.git-svn |
Continue reading ‘migrate from SVN to GIT’ »
2011/04/29, 18:54
the following steps are required to adjust a fresh ubuntu to my personal language-preferences, including the default character encoding for gnome-terminal set to UTF-8
# install the required packages to generate the appropriate locales:
sudo aptitude install language-pack-de-base language-pack-de
# set the default environment variables:
echo '
# locale stuff
LANG=
LC_ALL=
# Character classification and case conversion:
LC_CTYPE="de_DE.utf8"
# Date and time formats:
LC_TIME="de_DE.utf8"
# Non-monetary numeric formats:
LC_NUMERIC="de_DE.utf8"
# Collation order:
LC_COLLATE="POSIX"
LC_MONETARY="de_DE.utf8"
LC_MESSAGES="POSIX"
LC_PAPER="de_DE.utf8"
LC_NAME="de_DE.utf8"
LC_ADDRESS="de_DE.utf8"
LC_TELEPHONE="de_DE.utf8"
LC_MEASUREMENT="de_DE.utf8"
LC_IDENTIFICATION="de_DE.utf8"
' | sudo tee -a /etc/environment |
IMPORTANT: you have to log out after these changes to make them work!!
2011/03/30, 17:34
hp-snmp-agents error: Service snmp has to be enabled to start service hp-snmp-agents
If you get an error like:
Setting up hp-snmp-agents (8.5.0.1.1-2) ...
insserv: Service snmp has to be enabled to start service hp-snmp-agents
insserv: exiting now!
update-rc.d: error: insserv rejected the script header
dpkg: error processing hp-snmp-agents (--configure):
subprocess installed post-installation script returned error exit status 1
Edit the file:
/var/lib/dpkg/info/hp-snmp-agents.postinst
and change the “update-rc.d “ to “update-rc.d -f “, then
apt-get -f install
and you should be back in business.
(copied 1-on-1 from craighoffman)
2011/03/09, 14:22
might be interesting for the unfortunate minds that are stuck with one of those MacOS computers:
HowTo: Make Ubuntu A Perfect Mac File Server And Time Machine Volume