move tb restore to Rakefile