mirror of
https://github.com/GreptimeTeam/greptimedb.git
synced 2026-09-06 13:38:59 +00:00
* fix: sandbox SQL local filesystem access Signed-off-by: jeremyhi <fengjiachun@gmail.com> * fix: address local file sandbox review findings Signed-off-by: jeremyhi <fengjiachun@gmail.com> * fix: support Windows local copy paths Signed-off-by: jeremyhi <fengjiachun@gmail.com> * fix: improve sandbox path errors Signed-off-by: jeremyhi <fengjiachun@gmail.com> * refactor: simplify local path error context Signed-off-by: jeremyhi <fengjiachun@gmail.com> * perf: stream secure filesystem listings Signed-off-by: jeremyhi <fengjiachun@gmail.com> * style: derive local file access default Signed-off-by: jeremyhi <fengjiachun@gmail.com> * fix: improve local file access errors Signed-off-by: jeremyhi <fengjiachun@gmail.com> * fix: address local file access review findings Signed-off-by: jeremyhi <fengjiachun@gmail.com> * test: simplify local file access coverage Signed-off-by: jeremyhi <fengjiachun@gmail.com> * fix: harden sandboxed local file backends Signed-off-by: jeremyhi <fengjiachun@gmail.com> * fix: reject directory copy targets before creation Signed-off-by: jeremyhi <fengjiachun@gmail.com> * fix: avoid implicit string clone in file table listing Signed-off-by: jeremyhi <fengjiachun@gmail.com> --------- Signed-off-by: jeremyhi <fengjiachun@gmail.com>
31 lines
1.3 KiB
Markdown
31 lines
1.3 KiB
Markdown
# Migrate Local SQL File Access
|
|
|
|
SQL access to local files is sandboxed in standalone deployments and disabled in
|
|
distributed deployments.
|
|
|
|
## Standalone
|
|
|
|
The default sandbox is `<storage.data_home>/copy`. Relative paths in `COPY` and
|
|
external-table locations are resolved below this directory. Absolute paths work
|
|
only when they are inside the sandbox.
|
|
|
|
Before upgrading, identify existing `COPY` workflows and external tables that
|
|
use local paths outside the default sandbox. Choose one of these migrations:
|
|
|
|
- Move the files below `<storage.data_home>/copy` and update the SQL locations.
|
|
- Set `storage.copy_root` to a dedicated local directory containing the files.
|
|
- Move the files to S3, OSS, GCS, or AzBlob and update the SQL locations.
|
|
|
|
Do not set `storage.copy_root` to `storage.data_home` or to a directory that
|
|
contains GreptimeDB data, WAL, manifests, or configuration files. GreptimeDB
|
|
rejects copy roots that expose its internal data directory.
|
|
|
|
When `storage.data_home` is an object-storage URL, local SQL file access is
|
|
disabled unless `storage.copy_root` explicitly names a local directory.
|
|
|
|
## Distributed
|
|
|
|
Distributed frontend and datanode processes reject local paths for `COPY TABLE`,
|
|
`COPY QUERY`, `COPY DATABASE`, and external tables. Migrate these workflows and
|
|
tables to S3, OSS, GCS, or AzBlob before upgrading.
|