Usage: ratarmount [-h | -u | --commit-overlay | -v | --oss-attributions-short | --oss-attributions] [--mount | --no-mount] [-r | --recursive | --no-recursive] [-P PARALLELIZATION] [--password PASSWORD] [-w WRITE_OVERLAY] [-c | --recreate-index | --no-recreate-index] [--verify-mtime | --no-verify-mtime] [--index-file INDEX_FILE] [--index-folders INDEX_FOLDERS] [--recursion-depth RECURSION_DEPTH] [-l | --lazy | --no-lazy] [-s | --strip-recursive-tar-extension | --no-strip-recursive-tar-extension] [--transform-recursive-mount-point REGEX_PATTERN REPLACEMENT] [-e ENCODING] [-i | --ignore-zeros | --no-ignore-zeros] [--gnu-incremental | --no-gnu-incremental] [--detect-gnu-incremental] [-d DEBUG] [--log-file LOG_FILE] [--color | --no-color] [-o FUSE] [-f | --foreground | --no-foreground] [-gs GZIP_SEEK_POINT_SPACING] [-p PREFIX] [--password-file PASSWORD_FILE] [--use-backend USE_BACKEND] [--disable-union-mount] [--file-versions | --no-file-versions] [--union-mount-cache-max-depth UNION_MOUNT_CACHE_MAX_DEPTH] [--union-mount-cache-max-entries UNION_MOUNT_CACHE_MAX_ENTRIES] [--union-mount-cache-timeout UNION_MOUNT_CACHE_TIMEOUT] [--index-minimum-file-count INDEX_MINIMUM_FILE_COUNT] [--transform REGEX_PATTERN REPLACEMENT] [--control-interface | --no-control-interface] mount_source [mount_source ...] [mount_point] With ratarmount, you can: - Mount an archive to a folder for read-only access - Mount a compressed file to `/` - Bind-mount a folder to another folder for read-only access - Union mount a list of archives, compressed files, and folders to a mount point for read-only access - Mount an archive with a write-overlay mapped to a folder for read-write access - Remotely mount an archive from the internet via https:// for read-only access - And much more Commands: --commit-overlay Apply deletions and content modifications done in the write overlay to the archive. (default: False) --oss-attributions Show licenses of used libraries. --oss-attributions-short Show license identifiers of used libraries. -h, --help Show this help message and exit. -u, --unmount Unmount the given mount point(s). Equivalent to calling "fusermount -u" for each mount point. (default: False) -v, --version Print version information and exit. Mount Options: --password PASSWORD Specify a single password which shall be used for RAR and ZIP files. (default: ) -P, --parallelization PARALLELIZATION If an integer other than 1 is specified, then the threaded parallel decoders will use the specified amount of block decoder threads. Further threads with lighter work may be started. A value of 0 will use all the available cores (24). Fine-granular parallelization for each backend can be specified with: ":,:,:,..." (default: :1,rapidgzip-bzip2:0) -r, --recursive, --no-recursive Mount archives inside archives recursively. Same as --recursion-depth -1. (default: False) -w, --write-overlay WRITE_OVERLAY Specify an existing folder to be used as a write overlay. The folder itself will be union-mounted on top such that files in this folder take precedence over all other existing ones. Furthermore, all file creations and modifications will be forwarded to files in this folder. Modifying a file inside a TAR will copy that file to the overlay folder and apply the modification to that writable copy. Deleting files or folders will update the hidden metadata database inside the overlay folder. (default: None) Positional Options: mount_source The path to the TAR archive to be mounted. If multiple archives and/or folders are specified, then they will be mounted as if the arguments coming first were updated with the contents of the archives or folders specified thereafter, i.e., the list of TARs and folders will be union mounted. mount_point The path to a folder to mount the TAR contents into. If no mount path is specified, the TAR will be mounted to a folder of the same name but without a file extension. (default: None) Index Options: --index-file INDEX_FILE Specify a path to the .index.sqlite file. Setting this will disable fallback index folders. If the given path is ":memory:", then the index will not be written out to disk. If the specified path is a remote URL, such as "https://host.org/file.tar.index.sqlite", or a compressed index, such as "file.tar.index.sqlite.gz", then the index file will be downloaded and/or extracted into the default temporary folder (/tmp). This path can be changed with the environment variable RATARMOUNT_INDEX_TMPDIR. The temporary folder in general can also be changed with these environment variables in decreasing priority: TMPDIR, TEMP, TMP as described in the Python tempfile standard library documentation. (default: None) --index-folders INDEX_FOLDERS Specify one or multiple paths for storing .index.sqlite files. Paths will be tested for suitability in the given order. An empty path will be interpreted as the location in which the TAR resides. If the argument begins with a bracket "[", then it will be interpreted as a JSON-formatted list. If the argument contains a comma ",", it will be interpreted as a comma-separated list of folders. Else, the whole string will be interpreted as one folder path. Examples: --index-folders ",~/.foo" will try to save besides the TAR and if that does not work, in ~/.foo. --index-folders '["~/.ratarmount", "foo,9000"]' will never try to save besides the TAR. --index-folder ~/.ratarmount will only test ~/.ratarmount as a storage location and nothing else. Instead, it will first try ~/.ratarmount and the folder "foo,9000". (default: ,~/.cache/ratarmount,~/.ratarmount) --mount, --no-mount When --no-mount is specified, exit after indexes for the specified files have been created. Do not create a mount point. (default: True) --verify-mtime, --no-verify-mtime By default, only the TAR file size is checked to match the one in the found existing ratarmount index. If this option is specified, then also check the modification timestamp. But beware that the mtime might change during copying or downloading without the contents changing. So, this check might cause false positives. (default: False) -c, --recreate-index, --no-recreate-index If specified, pre-existing .index files will be deleted and newly created. (default: False) Recursion Options: --recursion-depth RECURSION_DEPTH This option takes precedence over --recursive. Mount archives inside the mounted archives recursively up to the given depth. A negative value represents infinite depth. A value of 0 will turn off recursion (same as not specifying --recursive in the first place). A value of 1 will recursively mount all archives in the given archives but not any deeper. Note that this only has an effect when creating an index. If an index already exists, then this option will be effectively ignored. Recreate the index if you want change the recursive mounting policy anyways. (default: None) --transform-recursive-mount-point REGEX_PATTERN REPLACEMENT Specify a regex pattern and a replacement string, which will be applied via Python's re module to the full path of the archive to be recursively mounted. E.g., if there are recursive archives: /folder/archive.tar.gz, you can substitute '[.][^/]+$' to '' and it will be mounted to /folder/archive.tar. Or you can replace '^.*/([^/]+).tar.gz$' to '/' to mount all recursive folders under the top-level without extensions. (default: None) -l, --lazy, --no-lazy When used with recursively bind-mounted folders, TAR files inside the mounted folder will only be mounted on first access to it. (default: False) -s, --strip-recursive-tar-extension, --no-strip-recursive-tar-extension If true, then recursively mounted TARs named .tar will be mounted at /. This might lead to folders of the same name being overwritten, so use with care. The index needs to be (re)created to apply this option! (default: False) Tar Options: --detect-gnu-incremental If specified, will automatically try to detect GNU tar incremental files and, if so, will strip octal modification prefixes. Note that this is only a heuristic derived by testing 1000-10000 file entries. If you are sure it is an incremental TAR, use --gnu-incremental instead. (default: False) --gnu-incremental, --no-gnu-incremental Enable or disable stripping of octal modification time prefixes from file paths, which appear in GNU incremental backups created with GNU tar with the --incremental or --listed-incremental options. This overwrites automatic detection if specified before this. (default: False) -e, --encoding ENCODING Specify an input encoding used for file names among others in the TAR. This must be used when, e.g., trying to open a latin1 encoded TAR on an UTF-8 system. Possible encodings: https://docs.python.org/3/library/codecs.html#standard-encodings (default: utf-8) -i, --ignore-zeros, --no-ignore-zeros Ignore zeroed blocks in archive. Normally, two consecutive 512-blocks filled with zeroes mean EOF and ratarmount stops reading after encountering them. This option instructs it to read further and is useful when reading archives created with the -A option. (default: False) Output Options: --color, --no-color Enable or disable colored help and logging output. (default: True) --log-file LOG_FILE Specifies a file to redirect all output into. The redirection only takes effect after the mount point is provided because, without -f, there is no other way to get output after daemonization and forking into the background. (default: ) -d, --debug DEBUG Sets the debugging level. Higher means more output. Currently, 3 is the highest. (default: 1) Advanced Options: --control-interface, --no-control-interface If enabled, adds a hidden /.ratarmount-control folder inside the mount point, which contains special files to communicate with the FUSE-providing ratarmount process. `/.ratarmount-control/output` to get log and error output of the running process. (default: False) --disable-union-mount Mounts all specified archives in equally named subfolders under the mount point. (default: False) --file-versions, --no-file-versions Enables special .versions/ folders to access different file versions if there are multiple in the archive or overlapping file paths for union mounting. (default: True) --index-minimum-file-count INDEX_MINIMUM_FILE_COUNT Create indexes for archives with fewer than this limit of files in memory instead of creating a .index.sqlite file. This is currently not applied for TAR files because the file count only becomes known after parsing the archive, for which an index is already created. (default: 1000) --password-file PASSWORD_FILE Specify a file with newline separated passwords for RAR and ZIP files. The passwords will be tried out in order of appearance in the file. (default: ) --transform REGEX_PATTERN REPLACEMENT Specify a regex pattern and a replacement string, which will be applied via Python's re module to the full paths of all archive files. (default: None) --union-mount-cache-max-depth UNION_MOUNT_CACHE_MAX_DEPTH Maximum number of folder levels to descend for building the union mount cache. (default: 1024) --union-mount-cache-max-entries UNION_MOUNT_CACHE_MAX_ENTRIES Maximum number of paths before stopping to descend into subfolders when building the union mount cache. (default: 100000) --union-mount-cache-timeout UNION_MOUNT_CACHE_TIMEOUT Timeout in seconds before stopping to build the union mount cache. (default: 60) --use-backend USE_BACKEND Specify a backend to be used with higher priority for files which might be opened with multiple backends. Arguments specified last will have the highest priority. A comma-separated list may be specified. Possible backends: ['PySquashfsImage', 'RatarmountIndex', 'asar', 'ext4', 'html', 'indexed_gzip', 'indexed_zstd', 'libarchive', 'lzmaffi', 'py7zr', 'pyfatfs', 'rapidgzip', 'rapidgzip-bzip2', 'rarfile', 'sqlar', 'tarfile', 'xz', 'zipfile'] (default: None) -f, --foreground, --no-foreground Keeps the python program in foreground so it can print debug output when the mounted path is accessed. (default: False) -gs, --gzip-seek-point-spacing GZIP_SEEK_POINT_SPACING This only is applied when the index is first created or recreated with the -c option. The spacing given in MiB specifies the seek point distance in the uncompressed data. A distance of 16MiB means that archives smaller than 16MiB in uncompressed size will not benefit from faster seek times. A seek point takes roughly 32kiB. So, smaller distances lead to more responsive seeking but may explode the index size! (default: 16) -o, --fuse FUSE Comma separated FUSE options. See "man mount.fuse" for help. Example: --fuse "allow_other,entry_timeout=2.8,gid=0". (default: ) -p, --prefix PREFIX DEPRECATED Use "-o modules=subdir,subdir=" instead. This standard way utilizes FUSE itself and will also work for other FUSE applications. So, it is preferable even if a bit more verbose.The specified path to the folder inside the TAR will be mounted to root. This can be useful when the archive as created with absolute paths. E.g., for an archive created with `tar -P cf /var/log/apt/history.log`, -p /var/log/apt/ can be specified so that the mount target directory >directly< contains history.log. (default: ) Examples: - ratarmount archive.tar.gz - ratarmount --recursive archive.tar mountpoint - ratarmount --unmount mountpoint mountpoint2 - ratarmount folder mountpoint - ratarmount folder1 folder2 mountpoint - ratarmount folder archive.zip folder - ratarmount --recursive folder-with-many-archives mountpoint - ratarmount -o modules=subdir,subdir=squashfs-root archive.squashfs mountpoint - ratarmount http://server.org:80/archive.rar folder folder - ratarmount ssh://hostname:22/relativefolder/ mountpoint - ratarmount ssh://hostname:22//tmp/tmp-abcdef/ mountpoint - ratarmount github://mxmlnkn:ratarmount@v0.15.2/tests/single-file.tar mountpoint - AWS_ACCESS_KEY_ID=aaaaaaaaaaaaaaaaaaaa AWS_SECRET_ACCESS_KEY=bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb \ ratarmount s3://127.0.0.1/bucket/single-file.tar mounted - ratarmount --control-interface mounted For further information, see the ReadMe on the project's homepage: https://github.com/mxmlnkn/ratarmount