Posts mit dem Label backup werden angezeigt. Alle Posts anzeigen
Posts mit dem Label backup 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!


 




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.

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?

Mittwoch, 4. Januar 2012

More backup: BUP

A pretty new project is BUP which is using GIT as a base and has some very promising features, as announced at the recent C8C3 in Berlin, Germany.

But be warned: It's far from being complete or even stable (even if they already do testcases and so on), definitly worth a look (later):

https://github.com/apenwarr/bup