Fixes to backup scripts