1
0
Fork 0
mirror of https://github.com/borgbackup/borg.git synced 2024-12-21 23:33:07 +00:00

--append-only and --storage-quota are not supported (yet?)

This commit is contained in:
Thomas Waldmann 2024-09-08 12:32:35 +02:00
parent b50ed04ffc
commit 3794e32890
No known key found for this signature in database
GPG key ID: 243ACFA951F78E01
2 changed files with 10 additions and 2 deletions

View file

@ -4,7 +4,7 @@
from ..cache import Cache
from ..constants import * # NOQA
from ..crypto.key import key_creator, key_argument_names
from ..helpers import CancelledByUser
from ..helpers import CancelledByUser, CommandError
from ..helpers import location_validator, Location
from ..helpers import parse_storage_quota
from ..manifest import Manifest
@ -19,6 +19,10 @@ class RCreateMixIn:
@with_other_repository(manifest=True, compatibility=(Manifest.Operation.READ,))
def do_rcreate(self, args, repository, *, other_repository=None, other_manifest=None):
"""Create a new, empty repository"""
if args.storage_quota is not None:
raise CommandError("storage-quota is not supported (yet?)")
if args.append_only:
raise CommandError("append-only is not supported (yet?)")
other_key = other_manifest.key if other_manifest is not None else None
path = args.location.canonical_path()
logger.info('Initializing repository at "%s"' % path)

View file

@ -2,7 +2,7 @@
from ._common import Highlander
from ..constants import * # NOQA
from ..helpers import parse_storage_quota
from ..helpers import parse_storage_quota, CommandError
from ..remote import RepositoryServer
from ..logger import create_logger
@ -13,6 +13,10 @@
class ServeMixIn:
def do_serve(self, args):
"""Start in server mode. This command is usually not used manually."""
if args.append_only:
raise CommandError("append-only is not supported (yet?)")
if args.storage_quota is not None:
raise CommandError("storage-quota is not supported (yet?)")
RepositoryServer(
restrict_to_paths=args.restrict_to_paths,
restrict_to_repositories=args.restrict_to_repositories,