Posts mit dem Label software werden angezeigt. Alle Posts anzeigen
Posts mit dem Label software werden angezeigt. Alle Posts anzeigen

Dienstag, 22. Oktober 2013

How to mount your backups with Obnam using FUSE

With the latest version 1.5 Obnam introduced a pretty cool new feature: You now can mount your backup as if it would be a "virtual hard drive". That is, you don't need to extract / restore your backup using Obnam's command line anymore if you only are interested in certain files or directories to restore.

Since this feature is pretty new I had to bring myself up-to-date on how to exactly use the mount option. Since this is FUSE (Filesystem in Userspace) you don't need to be root to mount the actual backup. Still, it took my a while until I figured out the right parameters to make it all work.


This is how to make it happen (tested on Ubuntu / Mint / Debian):

First, you have to create a new directory in your home directory where to actually let Obnam mount the backup into. I chose
/home/<your-user-name>/tmp/obnam
for that.
Second, your user needs to be part of the group "fuse". This already should be the case, and if not: 
 sudo usermod -a -G fuse <your-user-name>

Now comes the fun part: Mounting your backup! For me, my backups are located on my NAS, which in turn are mounted (read-only, for saftey!) into
/media/ds212/backup/<your-hostname>/backup_YYMM

To mount the this backup repository, do a

obnam mount --repository /media/ds212/backup/<your-hostname>/backup_1310/ --client-name <your-hostname> --viewmode=multiple / --to=/home/<your-user-name>/tmp/obnam
Note: Execute the command above as your regular user, not as root! The backup will be mounted as ready-only -- makes sense with a backup, does it?

Now you should be able to access your backup within

/home/<your-user-name>/tmp/obnam

The cool thing is: With the option --viewmode=multiple just supplied above you can access all backup generations so far created at once. The latest folder contains a link to the, well, latest backup made.

To unmount the backup you need to be root however: sudo umount obnam

Have fun with this cool feature!

Sonntag, 13. Oktober 2013

How to debug SSH path problems on Synology NASes

Recently I wanted to add just another backup job to my beloved DS212+ Synology NAS box. This job essentially does a bit of shell stuff via SSH on that box, also requiring to have some of the optware binaries in $PATH.

Well, first it didn't work out because apparently the optware binaries (more precisely /opt/bin and /opt/sbin) weren't in SSH's $PATH. However, I was pretty sure (and of course double checked!) that $PATH was tweaked correctly in the .ssh/environment file and that sshd was restarted after that.

To debug the issue further I just started another SSH instance on the Synology, using a different port + in foreground debug mode: 

/usr/syno/sbin/sshd -d -D -p 2222

On my client I then did this:

ssh -v root@<IP-to-my-NAS> echo \$PATH

Ah ha! The "Environment:" on the client side now told me that it indeed was picking up the wrong $PATH. But wait: Where did this come from?

Quick answer: Synology's start/stop script located at

/usr/syno/etc/rc.d/S95sshd.sh

kind of messes it up. For the sake of speed I believe it doesn't really terminate the old sshd instance and instead just drops existing connections. This is why changes to .ssh/environment do not get applied correctly after restarting the service.

Solution to all this now sounds pretty simple: Log in to DSM (DiskStation Manager) via web interface, go to system settings / terminal and (again) activate "SSH". This will (re-)start sshd the right way with the new environment settings picked up. Crappy, but works!


 




Samstag, 11. Mai 2013

"I Contribute to the Windows Kernel. We Are Slower Than Other Operating Systems. Here Is Why."

Just found a very nice post over at HackerNews which apparently is from an engineer working at Microsoft, comparing the innovation speed of Linux and MS kernels. A must-read for techies: http://blog.zorinaq.com/?e=74

Freitag, 10. Mai 2013

Tiny Tiny RSS and Synology NASes

Today I spent a bit of time to evaluate Tiny Tiny RSS, an Open-Source and web-based RSS client with API support and much, much more.

I simply wasn't too happy with my last Feedly experiments, namely: No plugins, no filtering / tagging / scoring support and, well, it's closed-source. So I decided to give Tiny Tiny RSS a try. Why? Maybe you've heard about Google Reader closing soon.

Luckily, Syno Community is offering a (beta) package for Synology NASes, like for my DS212+. To get this package you have to add Syno Community's package repository with a special parameter:

http://packages.synocommunity.com/?beta=1

(Note the ?beta=1 at the end)

After adding, installation should go pretty smooth. Oh, and did I mention you have to enable MySQL and Web Station before doing that? Otherwise it won't work. Really.

In case you're wondering what's your admin user default password (in case you didn't change it yet) for the MySQL server: it's empty, nothing, nada.

If Tiny Tiny RSS' update daemon is not running correctly, that is, your feeds don't get updated, see the next steps:

Stop the package in the Synology package manger.

Check what's going on by manually running

su -m nobody -c "php /var/services/web/tt-rss/update.php --daemon"

on the SSH command line.

If there's an error like "sh: /usr/syno/bin/php: not found" you have to link the existing PHP binary via

ln -s /usr/bin/php /usr/syno/bin/php

After that the regular "--daemon" should work and also update the feeds. Now you can start the package again in the package manager.

Hope this helps.






Mittwoch, 29. August 2012

Replacing OpenJDK with Oracle/Sun Java on Ubuntu and Mint

Ever wanted "the real thing" on your lovely Ubuntu or Mint installation when it comes to Java? Search no more, here's the solution: Duinsoft developed a very nice script / installer which does all the installation of the most recent Java Runtime from Oracle (formerly Sun) for you:

http://www.duinsoft.nl/packages.php?t=en

So in order to replace the pre-installed OpenJDK on your box you essentially need to follow the quick instructions ("Repository") on the site mentioned above plus purging the OpenJDK stuff afterwards with:

sudo apt-get purge openjdk-\* icedtea-\* icedtea6-\*

After all the voodoo is over you should get the following prompt when doing a

java -version

Java(TM) SE Runtime Environment (build 1.7.0_06-b24)
Java HotSpot(TM) 64-Bit Server VM (build 23.2-b09, mixed mode)

(Note: Exact build numbers may vary, depending on when you installed the stuff.)

Best thing is: You don't need to all that installation mess again, the script from Duinsoft will take care of it in the future from now on.

Montag, 23. Juli 2012

Tahoe-LAFS, a decentralized p2p file system in Python

While browsing through my "to-read" bookmarks I again stumbled upon Tahoe-LAFS, a decentralized peer-to-peer filesystem implemented in Python. This thing really looks promising, providing encrypted and (hopefully) secure storage of all your data across the web. Thaoe is not meant to be for the end-user (yet) really, but maybe there will be some nice addons to all the Dropbox clones out there which then finally could be used with end-to-end encryption. For non-geeks: This means that, if Thaoe is being used together with a service like Dropbox, nobody but you - not even by the Dropbox staff itself - can access your data anymore.

I'll have to play around with this a bit more in the next upcoming days. Let's see how it performs.

Oh, and here's the website in case you can't wait to get your hands on yourself: https://tahoe-lafs.org/trac/tahoe-lafs
 

Donnerstag, 12. Juli 2012

A (Mostly) Gentle Introduction to Computer Security (by Todd Austin)

Just dug out a nice video recorded over at  LinuxConf.au 2012 from Todd Austin, which gives an introduction of (general) computer security concepts and some details behind it. Well done stuff, be sure to check it out:


Dienstag, 5. Juni 2012

What happened to Syncany? Not dead -- really?

I recently visited the Syncany page again to check what (finally) the status is: Apparently a news entry from April 2012 is there telling that the project is not dead. Well, at least something, but hopefully this won't end up being the next Duke Nukem Forever. Don't get me wrong: I'm really looking forward trying out Syncany as soon as it's ready, but competition (aka OwnCloud, CamliStore and such) is not sleeping. While I don't really believe in SparkleShare coming up with something really good anymore there must be a new alternative ...we will see (and hope).

Montag, 4. Juni 2012

Yet another backup solution: Backshift

If you follow my blog a bit more closely you surely recognized my habit of always looking for the perfect backup solution.

Well, here's another (rather new) one: Backshift.
To quote the webpage:
  • rsync can be used to copy a filesystem from one host to another, or for backups using rsync's --link-dest option plus a small wrapper script
  • Backshift is only for backups, and works analogously to rsync --link-dest, but it deduplicates variable-lengthed blocks of the files both intra-host and inter-host, and compresses those blocks using xz.

Although it's pretty new it already claims a lot -- just have a look at the nice comparison table over here.

Sonntag, 3. Juni 2012

Make RSSOwl work with Mint 13 (Maya)

Sigh, that took me a while to figure out. After re-installing my Linux base system (moved from an ancient but steadily upgraded Ubuntu to Mint 13 aka Maya because of their lovely Cinnamon desktop) I could not run RSSOwl anymore.

I'm using RSSOwl because of their nice Google Reader integration which enables me to keep track of all the news on different devices I'm using nowadays.

Anyhow, RSSOwl just failed to load on my brand new Mint with the error message "Failed to create the browser", aborting the whole thing afterwards.

For Mint (and maybe other Ubuntu-related distributions out there) you need to do the following in order to make RSSOwl start successfully again:

  1. Go into your RSSOwl/xulrunner directory (e.g. /opt/rssowl/xulrunner) and execute:
    chmod 755 $(file * | grep executable | sed 's/:.*//')
  2. Then, do a:
    sudo ln -s /usr/lib/x86_64-linux-gnu/libhunspell-1.3.so.0 /usr/lib/x86_64-linux-gnu/libhunspell-1.2.so.0


    on a 64-bit system, or for 32-bit, do a:

    sudo ln -s /usr/lib/x86_32-linux-gnu/libhunspell-1.3.so.0 /usr/lib/x86_32-linux-gnu/libhunspell-1.2.so.0
The first step makes sure that all file permissions for xulrunner (a component RSSOwl needs) are set correctly, the second step creates a symbolic link to point from libhunspell-1.2.so.0 to libhunspell-1.3.so.0. Xulrunner apparently is dynamically linked with the older libhunspell 1.2 but Mint already has version 1.3.
To manually figure out why xulrunner is unhappy a

./xulrunner --register-user


in the RSSOwl/xulrunner directory will tell you.

After the two steps above your RSSOwl installation should run without trouble again -- happy reading!

Samstag, 12. Mai 2012

[UPDATE] Installing / setting up my Synology DS212+

Lucky me! Right before the weekend all needed parts (that is, the Synology DS212+ itself plus 2 x 3TB Seagate ST3000DM001 7200 RPM) arrived in time to spend some fun hours with it. Bonus: My girlfriend isn't here for the entire weekend, so even more time available! Life can be sooo nice, aww ...

Alright, so after unpacking this nice little box I installed the HDDs and hooked it up to my network. Since the initial RAID parity checks takes a while I did some research on what I need to get working and what I want to do with my DS212+. In case you didn't know: The DS212+ runs a 2.6.32 Linux on an ARMv5 Marvell SoC with 2,0 GHz.

This post will list all the things I did to get my setup into a working state (and also act as a reminder in case I need to set it up another time / migrate).

SSH


First, enabling SSH is a good thing to do (but don't go for the ancient and unsecure telnet crap!) -- go right into DSM and enable SSH in the system preferences. You then can login via ssh (on Windows use putty) using root@<ip-of-your-DS212+> as the address. The password is the very same password you use for the DSM administrator account.

Adding external package sources

To get a few more packages to browse I just added some more SPK repository sources to  the DSM package manager:

http://update.10trum.de/packageupdate/getpackages.php
http://pcloadletter.comlu.com/
http://packages.mertymade.com/
http://synopkg.superzebulon.org/spkrepo/packages

http://pvr.unzureichende.info/synology

Security advise: Be sure to only add at least somewhat verified / community accepted repository sources to your DSM. If you install malicious software from untrusted repositories to your poor, little DiskStation this really can bring your stored data into trouble!

Installing IPKG support

Another nice thing to do is to add support for *.ipkg packages to get even more software to your NAS-device: Since the DS212+ has an ARMv5-based CPU one has to do the following to get the IPKG stuff working:

  1. Login as root via SSH to your DS212+ (see SSH section for more information).
  2. Go to the "@tmp" directory by doing a "cd /volume1/@tmp/".
  3. Do a "wget http://ipkg.nslu2-linux.org/feeds/optware/cs08q1armel/cross/unstable/syno-mvkw-bootstrap_1.2-7_arm.xsh".
  4. Execute the just downloaded script by "sh syno-mvkw-bootstrap_1.2-7_arm.xsh"
  5. Note: The execution will fail because the scripts contains a too tightend processor type check which simply can be changed in the next step.
  6. Go into the directory "bootstrap" (that was created by the script above) by "cd bootstrap", open the required file via "vi bootstrap.sh", go to the line which has "Feroceon-KW" in it and change it to just being "Feroceon" (without quotes). Leave the rest unchanged though! If you don't know how to operate "vi" then have a look here. After editing that line save the file and exit vi.
  7. Unmount "/opt" if still mounted: "umount /opt".
  8. Due to some wget incompatibilities the pre-installed DSM version vs. the wget version IPKG will install the root's PATH variable needs to be adjusted first: Do a "vi /root/.profile" (note the dot in front of the filename!) and add "/opt/bin:/opt/sbin/" in front of the PATH variable's value so that it might looks like this: "PATH=/opt/bin:/opt/sbin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/syno/bin:/bin:/sbin:/usr/bin ...". Exit the editor after you saved the file.
  9. Apply the changes to the environment by doing a "source /root/.profile".
  10. Go back to the "@tmp/bootstrap" directory by doing a "cd /volume1/@tmp/".
  11. Execute the script again by "sh bootstrap.sh".
  12. Now the script should report no error anymore and the IPKG stuff should get installed.
Phew, lot of stuff, wasn't it? So to update your IPKG package list you just need to do "ipkg update". This will retrieve the current repository list which will contain more fun software to install. Do that every now and then to keep your list updated; also mind for security updates.

Installing bash

As the default installation uses BusyBox with ash as the shell I'm not too happy with that. So installing bash with a "ipkg install bash" helps. After installing setting it as the default shell in "/etc/passwd" (usually the first line is for user root) via "/opt/bin/bash" solves this problem.

Installing OpenSSH

To use scp from my desktop box to transfer files to my new DS212+ I needed OpenSSH -- there is a nice small blog post over at Literati Tech which explains what to do. See it here.

Installing rdiff-backup

There's small wiki article over at forum.synology.com which explains how to install rdiff-backup. See it here.
Oh, and for getting your self-stitched backup script up and running you also might want to install coreutils by doing a "ipkg install coreutils" (includes mktemp and so on which busybox doesn't offer).


TODO: htop, vim

Fixing German Umlauts for Samba shares

This one took me a while to figure out. As I occasionally read German articles or documentation I got some files with German Umlauts (ä, ö etc.) in it. After putting them on my DS212+ the naming was screwed up on both, the Samba share on my Ubuntu (Mint) box and via SSH (sh).

To fix this you need to edit the file "/usr/syno/etc/smb.conf" by adding
 
unix charset = ISO8859-1

to the [globa] section. After that you need to restart Samba by doing a

/usr/syno/etc/rc.d/S80samba.sh restart

Also, edit your Samba shares on your local box (probably /etc/fstab) to include

iocharset=iso8859-1,codepage=CP850
 
in the mount options per share. For reference, my mount options look like this:

//192.XX.XX.XX/music       /media/ds212/music            cifs    _netdev,auto,iocharset=iso8859-1,codepage=CP850,user,uid=XXX,credentials=/etc/samba/auth_ds212.conf    0       0


After re-connecting to your Samba shares the Umlauts finally should work now.



Developing further ...watch out for updates!


Freitag, 13. April 2012

ZeroBin - a client-side encrypted pastebin alternative

If you're interested in running your own pastebin clone but don't want to let the server store the pasted text/code/whatever unencrypted you should give ZeroBin a try: It's a slick alternative to pastebin which uses modern browsers and JavaScript to encrypt the pasted content on the client before the data gets sent and stored on the server. To let someone else decrypt and view the content there's the decryption key built-in to the actual ZeroBin URL. Oh, did I mention it's also Open Source? Here you have it.

Try the demo here, more information can be retrieved on the actual project page here.

Mittwoch, 11. April 2012

x86 Assembly Primer for C Programmers

Some days earlier I stumbled upon a nice project from Ivan Sergeev which is sort of an open book about x86 Assembly for those who already program in C (or C++) to extend your skillz being a system programming ninja. Oh, and using Linux or at least a working GCC toolchain is an advantage here. And be warned though: This isn't an "x86 Assembly for Dummies"; a steep learning curve guaranteed.

As far as I know the whole thing only is available in PDF format over at his github hive. You can download it directly using this link. Be sure to check back for updates (or getting the provided examples).

Thanks Ivan, for this wonderful resource! Keep up the good work!

Freitag, 24. Februar 2012

Xv6 - Unix-like OS in C for teaching purposes

Here's another one from my bookmark cruft: Xv6, a Unix v6-like OS rewritten from scratch (in C, with a little help of Assembly) to teaching operating systems: http://pdos.csail.mit.edu/6.828/2011/xv6.html

About Unicode and Character Sets

Just dug out some older blog article from Joel Spolsky which - in my eyes - really became a classic and a must-read for every programmer out there:

The Absolute Minimum Every Software Developer Absolutely, Positively Must Know About Unicode and Character Sets (No Excuses!)

Don't know this one yet? Read it, you won't regret it! :-)

Sonntag, 12. Februar 2012

AMPPS - Try online software with no remorse

Some of you maybe already heard of it or even have used it so far, but I just stumbled over AMPSS, a free package (or better: software stack) containing over 250 software appliances such as Wordpress, Joomla or (my favorite!) Tine 2.0 in a ready-to-go state using the well-known Apache, PHP, MySQL combination.

Don't use this for production systems of course, but AMPPS is compelling and very time-saving when you want/need to evaluate online system like the ones mentioned above. Give it a try!

Freitag, 20. Januar 2012

Javascript compilation and obfuscation

As a C/C++ guy I'm used to some sort of type safety which Javascript unfortunately can't do out-of-the-box. To start a small new project of mine I was evaluating several mobile development frameworks (see my former post(s)) along with Javascript tools.

What most people (at least at the time of writing) do say is: Forget to try to obfuscate, hide and/or pseudo-encrypt your hardly-written Javascript code. If there's someone who wants to steal your code, then there will be way to do it, period.

But what's more about RTTI or type-safety in general? From former Javascript experiments I know that it's much more likely that some part of an application breaks because some object or variable is used in a different way it was meant to be.

To make it short: I still don't have the definite answer for it, but I found the Closure Compiler so far and it makes a rather good impression to me (besides some critism found on stackoverflow and others).

I really would love to get Javascript compiled (yes, I know, there's Google's Dart coming up!) ...maybe some Lint replacement(s) will help me out? Searching further ...

Samstag, 14. Januar 2012

Mobile (Web) Frameworks in 2012

As I want to do some more development in the mobility sector (that is, for Android in the first place, iPhone comes later, maybe ...) I tried to get an overview of the current status of mobile (web) frameworks in beginning of 2012.

Well, as it sounds that easy -- it really isn't. This seems to be a hot topic all over the place since these frameworks all try (with diferent techniques though) to provide a common interface (API for the techies) to get your application on as much platforms as possible.

This of course also has its drawbacks: While you then can develop your application in pure HTML5 / CSS using regular JavaScript (plus jQuery etc) you cannot access native device feature like the camera or the accelerometer.

If you go for the hybrid approach, that is using a framework which transforms your web application into a native application on Android or iOS, then you finally have access to (some) of the device specific features.

In general (at least for me) it was very hard to get a comprehensive overview of all these frameworks, toolkits and so on since it seems that every day there will be a new one which declares itself being "the ultimate solution (tm)".

Personally I'll give PhoneGap a try which does the hybrid approach mentioned above. With that there are toolkits like Sencha Touch, The M Project or jQuery Mobile which can be used to build your actual application. This especially is nice if you want to provde regular desktop support (for Firefox, Chrome etc) using some node.js server as well. Another nice feature about PhoneGap is that you can write native plugins (for Android that would be in using Java using the Android SDK) which then can be called from the app's JavaScript code. MIT license, nice.

There's another framework called Appcelerator Titanium which does similar things, also for the old-school desktops.

Also consider reading some nice blog articles like Natives are restless, Developers guide to mobile frameworks or several articles over at interfacethis.com.

Oh, and when you need a HTML5 boilerplate, there's a nice template generator over at initializr.com, or, if you need a more mobile approach, take a look at html5boilerplate.com/mobile.

Other (maybe not so well-known) frameworks worth checking out:
http://www.winktoolkit.org/
http://www.knockoutjs.com
http://angularjs.org/
http://www.nimblekit.com/ (iPhone only)



Mittwoch, 11. Januar 2012

Synology DSM 4.0 with Synology Cloud Service

At CES 2012 Synology just announced a new release of their device firmware DSM (DiskStation Manager) in version 4.0.

Besides other improvements one really got my attention: Synology Cloud Service.

While I'm also a big fan of ZFS, btrfs, FreeNAS, OpenMediaVault (OMV) I really like Synology's device lineup with their easy-to-use software. Nothing really to setup, just unpack, configure a bit and you're ready to go.

Synology wants to release a 4.0 beta pretty soon, so I'll follow this one pretty closely ... DS712+ here I come ...

Thoughts: The dilemma of device-bound data

Recently the power supply of my main PC (that is, a regular PC with an old dual-core Intel) just died without a sign of trouble beforehand.

Since I still don't have a NAS and my data on this PC is spread over several hard disks inside I didn't have access to this data while my PC was out of order.
Especially using (and looking up) some E-Mails I really needed really was annoying since I had to use my external backup drive (1TB USB 3.0) on an laptop to get to those files. Being cautious while loading the backed up Thunderbird profile on that latop from my backup drive is necessary because I still do have some good old POP3-style accounts. Now, downloading data from these accounts while running a (temporary) backup profile would be very bad because all this data then would be lost or at least difficult to merge with my "real" profile later.

As more and more people move their data into clouds, on private servers or NASes here's my personal list of items I really should think about becoming an ubiquity:

- Old-style POP3 accounts; only use fat clients (e.g. Thunderbird) for IMAP
- Let retrieve IMAP accounts those old POP3 accounts (hosted by third parties)
- Personal data like pictures, documents, encrypted stuff
- Business data

As I already use a Dropbox alternative for some daily-use and small data I really would like to have a self-hosted cloud solution where I'm finally not bound to any device anymore. Even these two days where I wasn't able to use my main PC I recognized pretty fast - regardless of the backup I had - how much (important) data still is bound to it.

What do you think? Suggestions? How to you manage your daily data-life with multiple devices?