upgrade: Add missing bits for the s3 to s4 upgrade script