How to use borgmatic - 10 common examples

To help you get started, we’ve selected a few borgmatic examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github witten / borgmatic / tests / integration / commands / test_arguments.py View on Github external
def test_parse_arguments_disallows_json_with_both_list_and_info():
    flexmock(module.collect).should_receive('get_default_config_paths').and_return(['default'])

    with pytest.raises(ValueError):
        module.parse_arguments('list', 'info', '--json')
github witten / borgmatic / tests / integration / commands / test_arguments.py View on Github external
def test_parse_arguments_with_invalid_arguments_exits():
    flexmock(module.collect).should_receive('get_default_config_paths').and_return(['default'])

    with pytest.raises(SystemExit):
        module.parse_arguments('--posix-me-harder')
github witten / borgmatic / tests / integration / commands / test_arguments.py View on Github external
def test_parse_arguments_requires_archive_with_restore():
    flexmock(module.collect).should_receive('get_default_config_paths').and_return(['default'])

    with pytest.raises(SystemExit):
        module.parse_arguments('--config', 'myconfig', 'restore')
github witten / borgmatic / tests / integration / commands / test_arguments.py View on Github external
def test_parse_arguments_allows_archive_with_extract():
    flexmock(module.collect).should_receive('get_default_config_paths').and_return(['default'])

    module.parse_arguments('--config', 'myconfig', 'extract', '--archive', 'test')
github witten / borgmatic / tests / integration / commands / test_arguments.py View on Github external
def test_parse_arguments_allows_archive_with_restore():
    flexmock(module.collect).should_receive('get_default_config_paths').and_return(['default'])

    module.parse_arguments('--config', 'myconfig', 'restore', '--archive', 'test')
github witten / borgmatic / tests / integration / commands / test_arguments.py View on Github external
def test_parse_arguments_with_no_actions_passes_argument_to_relevant_actions():
    flexmock(module.collect).should_receive('get_default_config_paths').and_return(['default'])

    arguments = module.parse_arguments('--stats')

    assert 'prune' in arguments
    assert arguments['prune'].stats
    assert 'create' in arguments
    assert arguments['create'].stats
    assert 'check' in arguments
github witten / borgmatic / tests / integration / commands / test_arguments.py View on Github external
def test_parse_arguments_allows_progress_and_restore():
    flexmock(module.collect).should_receive('get_default_config_paths').and_return(['default'])

    module.parse_arguments('--progress', 'restore', '--archive', 'test', 'list')
github witten / borgmatic / tests / integration / commands / test_arguments.py View on Github external
def test_parse_arguments_disallows_glob_archives_with_successful():
    flexmock(module.collect).should_receive('get_default_config_paths').and_return(['default'])

    with pytest.raises(ValueError):
        module.parse_arguments(
            '--config', 'myconfig', 'list', '--glob-archives', '*glob*', '--successful'
        )
github witten / borgmatic / tests / integration / commands / test_arguments.py View on Github external
def test_parse_arguments_allows_progress_after_create():
    flexmock(module.collect).should_receive('get_default_config_paths').and_return(['default'])

    module.parse_arguments('create', '--progress', 'list')
github witten / borgmatic / tests / integration / commands / test_arguments.py View on Github external
def test_parse_arguments_allows_json_with_dashed_info():
    flexmock(module.collect).should_receive('get_default_config_paths').and_return(['default'])

    module.parse_arguments('--info', '--json')