Tag Archives: OS X

Avoid losing old Time Machine backups

Every now and then you get a problem with OS X’s Time Machine function. When that happens the system asks you to start a new backup which results in you losing all previous backups.

It hasn’t happened to me for more than two years or so and even if it does usually I have something in place so that I don’t lose my backups: My NAS backs up to another NAS that can take snapshots, so usually I’d be able to rollback to a previous snapshot of the Time Machine.

Unfortunately, when this happened to me recently I had just deleted the previous snapshots because I was running out of space and didn’t want to buy another hard disk – so I couldn’t roll back to a previous snapshot.

Well, for now I have just created a new Time Machine share, meaning that if I need to go back I can access the old Time Machine in the previous share.

PS: When I had an Apple Time Capsule this problem occurred every few months. With y Synology NAS it only seems to happen every few years.

 

Advertisements

Downloading a merging a .ts stream in OS X

Another brain dump to help me remember if I need to do this again.

Install wget

Install and make wget, information taken and updated from another blog.

curl -O http://ftp.gnu.org/gnu/wget/wget-1.18.tar.gz

tar -xzf wget-1.18.tar.gz

cd wget-1.18

./configure --with-ssl=openssl

make

sudo make install

cd .. && rm -rf wget*

Download video

Find file location in Safari’s Page Resources, then use with wget

wget -r http://filelocation/filename_{1..999}.ts

Merge files

cat filename_?.ts filename_??.ts filename_???.ts > all.ts

 

diff

Another command I want to write down, like dot_clean, so that I remember the details:
diff – Compare files line by line.
Usage: diff [OPTION]… FILES
FILES are `FILE1 FILE2′ or `DIR1 DIR2′ or `DIR FILE…’ or `FILE… DIR’.

diff -rq folder1 folder2

e.g. -r (rekursive) and -q (brief output)

diff -rq /Users/memm/Backup/Documents/ /Volumes/Documents/

dot_clean

I keep forgetting this command – I just don’t use it often enough, so I thought I write it down to make it easier to find. I need it when I copy mp3 files to a SD card for the car.

The command to delete hidden system files in OS X is:

dot_clean folder/

Just to spell it out, you can see all files (including hidden ones) using:

ls -a

Synology Backup to Dropbox

Synology

A few weeks ago I got a Synology NAS after having used a Netgear ReadyNAS for a few years.

The ReadyNAS was quite slow, especially when many small files are involved. I won’t go into details why it is the way it is, but the Synology NAS is much faster.

The ‘bare metal’ side of the Synology is worse (no display, case and drive bays more flimsy), but the software side is, generally, much better, with some exceptions (like the restrictions that snapshots have to be stored outside the RAID).

Backup

The (re)discovery of the loss of three months worth of digital photos made me rethink my backup situation, which is basically non-existent (RAID is nice but it isn’t backup).

I store snapshots of some folders on an external drive, but a better backup solution would be nice. I have thought about Amazon Glacier etc, but am not sure about the cost (not sure how many requests my backup would generate).

Dropbox

When I logged on to Dropbox I discovered, to my surprise, that I now have 1TB of storage – despite only having the free account …so I am now planning to use Dropbox to backup some folders, starting with my photo folder.

As I don’t want the nice guys from Dropbox seeing my photos I want to encrypt the backup. Not that there’s anything strange in my photos, but I haven’t read the Dropbox T&Cs that carefully, so I don’t know what they do with my files. I might also want to backup other files with more sensitive information in the future if this works well.

My plan was to create an encrypted disk image and sync it with Dropbox, but it turns out Synology has an option to encrypt the Backup for you. Unfortunately I didn’t find any useful information about what kind of encryption they use in their help file.

backup2dropbox

Problems with the out of the box solution

Unfortunately there are two problems with directly backing up files using Cloud Sync and the built-in data encryption.

  • Files are sent individually and file names are transmitted as is (e.g. puffins.jpg is still puffins.jpg) and
  • all files and subfolders of the folder I want to back up end up in my Dropbox’s root folder.

I’m not an expert, but I would  assume that knowing the files are jpg means you know how their header etc is supposed to look like, and having thousands of individually encrypted files, presumably encrypted with the same key, should make it easier for anyone trying to decrypt them. I don’t even know what Synology is using to encrypt the files – maybe some simple block cipher.

Alternative solution

My alternative solution is my original idea: to put all the files I want to back up in an encrypted disk image and sync that disk image to Dropbox. If you keep your files in disk image as well as in their ‘usual’ place it does however mean that you use up twice as much space on your NAS.

I created a new share where the encrypted disk image will go.

backup2dropbox1

I then set up Could Sync to sync this share with Dropbox.

I then created a new encrypted sparse bundle image in this share.

Disk Utility / New Image. Choose sparse bundle under Image Format.

Sparse bundle images are a good choice because they expand when more files are being added, so they don’t take up too much unnecessary space.

sparsebundle

This way you still get individual files sent to Dropbox, but they are in your sparse bundle folder and they don’t directly correspond to your original files anymore.

Because this is supposed to be a backup, not something I need on all machines using Dropbox I used selective sync in Dropbox to stop it from syncing this folder to my computer.

selectivesync

MacBook Air 2014

After starting life as a place where I write down Raspberry Pi settings or discoveries this blog seems to become a dump for my general computer thoughts, at least at the moment.

The new MacBook Air

A few days ago I ordered a new MacBook Air, the 2014 version. I bought the 2010 version, that was the first one with a SSD, when it was new – and I’ve been very happy with it. The battery info only showed a few charging cycles >100 (rated: 1000), so it seems as if there’s still a lot of life left in this laptop.

What’s better

…but with Apple’s tempting offer, a voucher on top of the education discount, I coulnd’t resist. Other reasons to get the latest version were the specs when compared to the  2010 model:

  • twice the hard disk space (I was always very careful with the space available, so didn’t run into too many problems yet)
  • ~3x as fast (the 2010 version felt a bit slow after the Mavericks update)

On top of that the new version also has

  • twice the RAM
  • ~3x the battery life

…but these last two factors didn’t seem that important to me.

 

What’s worse

There wasn’t really much time yet, but there are a few things I noticed – where the new version is worse than the old version – at least in my mind. Others might have different priorities and might not mind at all.

  • The keys feel much cheaper. My guess is that this is caused by the different, more plasticy noise they make, not as ‘low’ as the noise from the old keyboard. This might be caused by the fact that the keys are not backlit, which might mean that they’re more ‘hollow’.
  • The new MagSafe power connector is more bulky. The old one could just be used with some particularly chunky USB adapters plugged in next to it. This is not possible with the new connector. It doesn’t matter though for normal USB cables plugged in next to it.
  • The corner of the bottom half seems much less rounded off. This means it’s much less comfortable to rest your hands on the corners of the laptop – in fact it seems quite uncomfortable to me.
  • If you want to use the F5 button you’ve got to use the Fn key now to get to it.

On a positive note: the # key is marked on the keyboard now. Becasue I switch between different language versions and systems of keyboards I tend to forget where some of the special characters are, so I had to mark the key for # with a pen on my old laptop.

Apple Reinstall Drive

The new MacBook Air doesn’t come with a Reinstall Drive any more. It probably makes sense, as most users upgrade to the latest version of OS X anyway. I’m not sure whether the new MacBook Air has a reinstall partition. My old one didn’t, so I reinstalled it from the web, using “Command R”, and despite my fast internet connection (60Mb/s) it took quite a while. The Reinstall Drive looks so good, it’s a shame that as far as I know Apple didn’t sell USB sticks with this design.