OBackup rewritten in Scala