Overhaul of the backup and restore script templates