// tag::unix[] Linux and macOS installations support Unix-style paths: [source,yaml] ---- path: repo: - /mount/backups - /mount/long_term_backups ---- // tag::register-fs-repo[] After restarting each node, use {kib} or the <> to register the repository. When registering the repository, specify the file system's path: // end::register-fs-repo[] [source,console] ---- PUT _snapshot/my_fs_backup { "type": "fs", "settings": { "location": "/mount/backups/my_fs_backup_location", "compress": true } } ---- // TEST[skip:no access to path] // tag::relative-path[] If you specify a relative path, {es} resolves the path using the first value in the `path.repo` setting. // end::relative-path[] [source,console] ---- PUT _snapshot/my_fs_backup { "type": "fs", "settings": { "location": "my_fs_backup_location", <1> "compress": true } } ---- // TEST[skip:no access to path] <1> The first value in the `path.repo` setting is `/mount/backups`. This relative path, `my_fs_backup_location`, resolves to `/mount/backups/my_fs_backup_location`. include::{es-repo-dir}/snapshot-restore/register-repository.asciidoc[tag=multi-cluster-repo] // tag::fs-repo-read-only[] To register a file system repository as read-only using the create snapshot repository API, set the `readonly` parameter to true. Alternatively, you can register a <> for the file system. // end::fs-repo-read-only[] [source,console] ---- PUT _snapshot/my_fs_backup { "type": "fs", "settings": { "location": "my_fs_backup_location", "readonly": true } } ---- // end::unix[] // tag::win[] Windows installations support both DOS and Microsoft UNC paths. Escape any backslashes in the paths. For UNC paths, provide the server and share name as a prefix. [source,yaml] ---- path: repo: - "E:\\Mount\\Backups" <1> - "\\\\MY_SERVER\\Mount\\Long_term_backups" <2> ---- <1> DOS path <2> UNC path include::register-fs-repo.asciidoc[tag=register-fs-repo] [source,console] ---- PUT _snapshot/my_fs_backup { "type": "fs", "settings": { "location": "E:\\Mount\\Backups\\My_fs_backup_location", "compress": true } } ---- // TEST[skip:no access to path] include::register-fs-repo.asciidoc[tag=relative-path] [source,console] ---- PUT _snapshot/my_fs_backup { "type": "fs", "settings": { "location": "My_fs_backup_location", <1> "compress": true } } ---- // TEST[skip:no access to path] <1> The first value in the `path.repo` setting is `E:\Mount\Backups`. This relative path, `My_fs_backup_location`, resolves to `E:\Mount\Backups\My_fs_backup_location`. include::{es-repo-dir}/snapshot-restore/register-repository.asciidoc[tag=multi-cluster-repo] include::register-fs-repo.asciidoc[tag=fs-repo-read-only] [source,console] ---- PUT _snapshot/my_fs_backup { "type": "fs", "settings": { "location": "my_fs_backup_location", "readonly": true } } ---- // TEST[skip:no access to path] // end::win[]