upgrade script with database backup