def restart(ctx, job_name, data, open_notebook, env, message, gpu, cpu, gpup, cpup, command):
    if len(env) > 1:
        floyd_logger.error(
            "You passed more than one environment: {}. Please specify a single environment.".format(env)
        )
        sys.exit(1)
    env = env[0]
    parameters = {}
    expt_client = ExperimentClient()
    try:
        job = expt_client.get(normalize_job_name(job_name))
    except FloydException:
        job = expt_client.get(job_name)
    if gpu:
        instance_type = G1_INSTANCE_TYPE
    elif cpu:
        instance_type = C1_INSTANCE_TYPE
    else:
        instance_type = job.instance_type
    if instance_type is not None:
        parameters['instance_type'] = instance_type
    else:
        instance_type = job.instance_type
    if env is not None:
        arch = INSTANCE_ARCH_MAP[instance_type]
        if not validate_env(env, arch):
            sys.exit(1)
        parameters['env'] = env
    success, data_ids, show_data_info = process_data_ids(data)
    if not success:
        sys.exit(1)
    if data_ids:
        parameters['data_ids'] = data_ids
    if message:
        parameters['description'] = message
    if command:
        parameters['command'] = ' '.join(command)
    floyd_logger.info('Restarting job %s...', job_name)
    new_job_info = expt_client.restart(job.id, parameters=parameters)
    if not new_job_info:
        floyd_logger.error("Failed to restart job")
        sys.exit(1)
    show_new_job_info(expt_client, new_job_info['name'], new_job_info, job.mode, open_notebook, show_data_info)