def METHOD_NAME(user, src_basedir, dest_basedir, dry_run):
    start_time = time.perf_counter()
    safe_chars = set(string.ascii_lowercase + string.digits)
    homedir = escape(user, safe_chars, '-').lower()
    src_homedir = os.path.join(src_basedir, homedir)
    if not os.path.exists(src_homedir):
        print(f"Directory {src_homedir} does not exist for user {user}, aborting")
        sys.exit(1)
    rsync_cmd = [
        'rsync', '-av',
        '--delete', '--ignore-errors',
        src_homedir, dest_basedir
    ]
    if not dry_run:
        subprocess.check_output(rsync_cmd)
    return user, time.perf_counter() - start_time