Umzug!

Dieses Blog ist umgezogen, oder vielmehr noch halb dabei. Normalerweise ist WordPress ja sehr ausgereift und benutzerfreundlich, aber eine existierende Installation umzuziehen hat mir dennoch einige Kopfschmerzen bereitet. Was bin ich froh, dass dies keine größere PHP-Webseite ist.

Hier ein paar hilfreiche Links:
http://www.elmastudio.de/wordpress/eine-wordpress-webseite-umziehen-teil-2-gleiche-domain-aber-neuer-hosting-anbieter/
http://www.smashingmagazine.com/2014/05/08/proper-wordpress-filesystem-permissions-ownerships/

Kurz gesagt hat es so ganz gut funktioniert (Reihenfolge teils variabel):

  • Datenbank mit PHPMyAdmin exportieren
  • Daten per FTP sichern
  • Domain per KK umziehen
  • Leere Datenbank anlegen, Backup importieren
  • Daten per FTP auf den neuen Server schieben
  • Subdomains korrekt konfigurieren
  • Datenbankzugang in wp-config.php rekonfigurieren
  • Rechte (chmod und chown) überprüfen und nach Bedarf anpassen

Letzteren Punkt musste ich entgegen meiner Hoffnung doch von Hand machen – zum Glück sind die Berechtigungen doch recht übersichtlich. Dateien 644 und Ordner 755 passt schonmal. Der Uploads-Ordner kommt ebenfalls mit 755 aus und wp-config.php sogar mit 400, wenn der Owner auf den PHP-Nutzer gesetzt wird.

Jetzt muss ich nur noch rausfinden, wieso ich auf dem alten Webspace nicht jedes Mal die FTP-Zugangsdaten eingeben musste, obwohl in der wp-config.php nichts dergleichen konfiguriert war oder ist.

Dies ist ein Testbeitrag, um mal zu sehen, ob wieder alles funktioniert. Leider ist der DNS-Server der Telekom etwas merkwürdig – beim Anpingen meiner anderen Domain kommt schon die neue IP, bei dieser noch die alte. Manche Subdomains werden aber dennoch schon vom neuen Server ausgeliefert. Wie gut, dass ich das nicht verstehen muss…

IMG_20150224_132103_klein

Alexanderson-Day 2014

Some time ago, I built a handheld VLF receiver following the schematic by Wilfried, DJ1WF: http://www.vlf.it/fritz/pocketrx.html

Unfortunately, I had no luck so far in receiving SAQ – either I couldn’t spare time when there was a transmission, or my location had too much QRM. This was also the case when I tried to receive the first transmission today at 9:00 UTC from my home shack, using my IC-728, a VLF converter and the dipole which is spanned across the garden.

So, after some breakfast, I went out and gave it another try with the handheld receiver – and it worked! Not extraordinarily good, but sufficient to clearly hear the CW signals from Grimeton.

I used a few meters of wire as an antenna and my trusty Zoom H1 to record everything (low cut enabled). Here are the audio files (one untouched and one software-filtered in Audacity) and a short video of the reception site. As you can see, the weather wasn’t really on our side, but what are a few drops of rain to stop a radio amateur? 😉

Painlessly moving /var to a new partition

When I installed my current Linux system, I created a root partition of only 10GB (mainly because I already had another distribution installed that I wanted to keep as a backup). While this is enough for my purposes, Audacity regularly filled up the whole partition with data in /var/tmp/audacity-daria. That is not only annoying (because Audacity will stop working), but also potentially dangerous for the stability of the whole system.
Now I could have just knocked off the other distribution and resized the root partition, but it occured to me that it would be a better way to just use its existing partition and move /var to it.

I found various different tutorials on how to do this around the web, so to make confusion complete I decided to add my own. 😀
I am currently running Ubuntu 13.10 (64-Bit), but this should work on any other recent Ubuntu/Debian release, and probably on most other current distributions, too.
I should also mention that I assume you have some basic knowledge about the file system structure on a linux system, that you know what a terminal is and you’re not afraid to use it. 😉

First of all, we need to format the partition we are going to move /var to. I did this with the graphical tool gparted. Some people use reiserfs, I simply stuck with ext4. In my case, the partition’s name is /dev/sda4. At this point, also create a new directory /var2 by entering sudo mkdir /var2. This is going to be our temporary mount point.
Before you edit your /etc/fstab file, make a backup of it! I am serious; if you do ANYTHING wrong, your whole system will be unable to boot!!! To do this, move to the directory and copy it:
cd /etc
sudo cp fstab fstab_backup

Now we can put our new partition into the fstab. Find out its UUID with the command blkid, that will return something like this:
/dev/sda1: UUID="e9325f37-4394-409f-bd9a-cb473ad0379f" TYPE="ext4"
/dev/sda2: UUID="75c07cfd-99ab-4a9f-a25c-d6db771c3565" TYPE="swap"
/dev/sda3: UUID="306b4fea-31c5-4eae-b631-c89374c28c12" TYPE="ext4"
/dev/sda4: UUID="20b0eecf-e80e-4d37-abe6-d2a2bb20078d" TYPE="ext4"
/dev/zram0: UUID="78caa6fc-d44e-4826-8e60-d0fc07e660cc" TYPE="swap"
/dev/zram1: UUID="323ad229-b8c4-44c5-8e56-006ca1fcaa9a" TYPE="swap"

Copy the value for /dev/sda4 (or whatever your partition is) without the quotation marks, and open the fstab with a text editor of your choice. I simply use nano: sudo nano /etc/fstab

Add the line for your new partition, so that it looks something like this:
UUID=20b0eecf-e80e-4d37-abe6-d2a2bb20078d /var2           ext4    defaults        0       2
(If you are curious what the other options mean, you might want to check the manpage for fstab.)

To mount everything according to new fstab, enter sudo mount -a. If no error occurs, you can also check if it has been correctly mounted with mount or gparted.

Now comes the tricky part. Enter sudo init 1, your system will drop down into single user mode, leaving you with only a root prompt. Now we need to copy everything from the „old“ /var to the new one. Enter sudo cp -a /var/* /var2/ – this may take a while. If you’re curious about the progress, add the option -v. You can check the correct execution by typing ls /var and ls /var2, which should look mostly the same.

If you want to empty the old /var, you need to do this now – you won’t be able to do it from within the system later on! But unless you urgently need space on the root partition, I wouldn’t touch anything more that necessary, just to be safe and able to go back, just in case.

Now, go back to the fstab, and just change the line for /var2 into /var. Again, you might want to check whether that worked by entering mount -a and mount.

Congratulations, we’re done! Type reboot and your system should come up like it has always been that way.

If you found any mistakes in my little tutorial, please drop me an e-mail!