<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:

def backup_all(args):
    '''
    Backup all databases with access user.
    '''
    username = None
    password = None
    auth = args.get('--auth')
    path = args.get('--path')
    s3 = args.get('--upload_s3')
    glacier = args.get('--upload_glacier')
    dropbox = args.get('--upload_dropbox')
    swift = args.get('--upload_swift')
    encrypt = args.get('--encrypt') or 'Y'

    if (ADMIN_USER and ADMIN_PASSWORD):
        username = ADMIN_USER
        password = ADMIN_PASSWORD

    if not path:
        path = os.getcwd()
    if path and not os.path.isdir(path):
        raise SystemExit(_error_codes.get(105))

    if auth:
        query = 'mongodump -u {username} -p {password} '
    else:
        query = 'mongodump '
    if path:
        query += '-o {path}/dump'

    local(query.format(username=username,
                       password=password,
                       path=path))

    compress_file = compress_folder_dump(
        normalize_path(path) + 'dump', normalize_path(path))

    shutil.rmtree(normalize_path(path) + 'dump')

    optional_actions(encrypt, path, compress_file, s3=s3, glacier=glacier,
                     dropbox=dropbox, swift=swift)