cd DIR && tar -cf - . | ssh newServerIP "cd DIR && tar -xpvf -"
This has the benfit of preserving the permission and ownership of the files.
dpkg --get-selections > PKGLIST
We transfer this PKGLIST to the new server and:
dpkg --set-selections < PKGLIST
Finally we tell apt-get to install the packages:
If we have installed apt-file, we need to retrieve its filelists:
Depeding on package selection, this is now a very unsecure situation: Services are up and running, but are unconfigured! Thus we shut them down. For me these are:
/etc/init.d/apach2 stop /etc/init.d/exim4 stop /etc/init.d/courier-imap-ssl stop /etc/init.d/mysql-server stop
mysqldump --password=ZZZ --all-databases > /root/MYSQL_DUMP
…and after transfering, this could be
mysql -p < /root/MYSQL_DUMP
The logrotate script (and some other maintainance stuff) of mysql uses a special account – which has an (during package installation) autogenerated password. We need to look the new one up in
(replace xxxxx belog with this) and finally we need to flush priviledges, thus all the permissions are correct and active:
mysql -p Welcome to the MySQL monitor. .... mysql> GRANT RELOAD, SHUTDOWN, PROCESS, SHOW DATABASES,\ SUPER, LOCK TABLES ON *.* TO \ 'debian-sys-maint'@'localhost' IDENTIFIED BY PASSWORD 'xxxxxx' mysql> FLUSH PRIVILEGES;
adduser NAME --uid UIDofOldSERVER
. While updateing
take care about changed GID of gorups like www-data!
and the normal www stuff from
, which includes gallery pix for me. and finally, dokuwiki’s data needs to be transfered from
, maybe also
, if aliases are defined there. Afterwards
needs to be transfered and checked if the deamon must be enabled in
. If you run mailinglists by mailman, transfer
as well as
, which includes the old archives.
Afterwards have a look, if
contains software, which might need to have special maintainance, if CPU architecture is different.
for not allowing root login any longer.