Forrest logo
back to the borg tool

borg:tldr:b8a44

borg: Extract a specific directory from the "Monday" archive in a remote repository, excluding all `*.ext` files.
$ borg extract ${user}@${host}:${path-to-repo_directory}::${Monday} ${path-to-target_directory} --exclude '${*-ext}'
try on your machine

This command is using the "borg" tool to perform the extraction of data from a repository created using the borg backup system.

Here is a breakdown of the command:

borg extract - This is the main command that initiates the extraction process.

${user}@${host}:${path-to-repo_directory} - This specifies the source location of the repository from which the data needs to be extracted. It consists of the user and host information followed by the path to the repository directory.

::${Monday} - Here, "::" is used to indicate a specific archive or snapshot within the repository, and ${Monday} represents the name or identifier of a particular snapshot. It signifies that the extraction process should be performed using the archive that was created on a Monday (assuming it is the name or identifier of a snapshot).

${path-to-target_directory} - This is the path to the directory where the extracted data will be saved. It specifies the location where the extracted files and folders will be stored.

--exclude '${-ext}' - This option is used to exclude certain files or directories from being extracted. In this case, it uses the "--exclude" flag followed by the pattern '${-ext}'. The pattern '${*-ext}' represents any file or directory name that ends with '-ext'. These items will be excluded from the extraction process.

Overall, this command extracts data from a specified repository directory using a specific snapshot (in this case, the one created on a Monday), saves the extracted data to a target directory, and excludes any files or directories with names ending in '-ext'.

This explanation was created by an AI. In most cases those are correct. But please always be careful and never run a command you are not sure if it is safe.
back to the borg tool