mirror of
https://github.com/seaweedfs/seaweedfs.git
synced 2026-10-18 12:08:32 +02:00
Update Mount-Remote-Storage.md
1 parent
51f187fb95
commit
f8ec586b82
1 file changed
+25
-13
+25
-13
@@ -87,9 +87,21 @@ With `-listingCacheTTL`, directory listings refresh automatically, reducing the
|
||||
|
||||
## Write Back Changes to Remote Storage
|
||||
|
||||
If the mounted directory is only for reading, you can skip this step.
|
||||
The filer does not push to remote on its own. Local changes — creates, updates, and deletes inside the mounted directory — only reach the remote bucket if you opt in to one of the write-back paths below. If neither is running, the mount behaves as a read-only cache.
|
||||
|
||||
If local changes need to be synchronized to the cloud storage, you have two options:
|
||||
### Read-Only Mount (Remote → Local Only)
|
||||
|
||||
If the remote bucket is the source of truth and the filer is just a cache, do not run `weed filer.remote.sync` and do not run `remote.copy.local`. With neither push path enabled, deleting a file from the filer only drops the local cache entry; the upstream blob is untouched and the metadata will reappear on the next `remote.meta.sync`.
|
||||
|
||||
A typical read-only setup combines a pull command, a warm-up command, and an evict command — all one-way from the remote's perspective:
|
||||
|
||||
| Concern | Command | Direction |
|
||||
|---|---|---|
|
||||
| Pick up new files added to the bucket out-of-band | `remote.meta.sync -dir=/xxx` (cron) | Remote → Local (metadata only) |
|
||||
| Pre-warm hot files locally | `remote.cache -dir=/xxx -include=...` | Remote → Local (data) |
|
||||
| Reclaim local disk on cold files | `remote.uncache -dir=/xxx -minAge=...` | Local-only (remote untouched) |
|
||||
|
||||
If `-listingCacheTTL` is set on `remote.mount`, listings refresh automatically and `remote.meta.sync` is rarely needed.
|
||||
|
||||
### Option 1: Continuous Sync with `weed filer.remote.sync`
|
||||
|
||||
@@ -152,17 +164,17 @@ Here's a comprehensive comparison of remote storage synchronization and caching
|
||||
|
||||
### Global Command Comparison
|
||||
|
||||
| Feature | `weed filer.remote.sync` | `remote.copy.local` | `remote.cache` | `remote.uncache` |
|
||||
|---------|-------------------------|---------------------|----------------|------------------|
|
||||
| **Type** | Long-running daemon | Shell command (batch) | Shell command (batch) | Shell command (batch) |
|
||||
| **Purpose** | Continuous sync (Local → Remote) | Backup local-only files (Local → Remote) | Download to local cache (Remote → Local) | Free up local storage (Local → Delete) |
|
||||
| **Data Flow** | Bidirectional (metadata) | Local → Remote | Remote → Local | Local → (Deleted) |
|
||||
| **Trigger** | Automatic (file events) | Manual / Cron | Manual / Cron | Manual / Cron |
|
||||
| **File Scope** | All changes | Local-only files | Files on remote | Cached files |
|
||||
| **Filters** | None (syncs all) | Yes (`include`/`exclude`) | Yes (`include`/`exclude`) | Yes (`include`/`exclude`) |
|
||||
| **Force** | Automatic | `-forceUpdate` | N/A | N/A |
|
||||
| **Dry Run** | No | `-dryRun` | `-dryRun` | `-dryRun` |
|
||||
| **Use Case** | Active writes, consistency | Backups, recovery | Warm-up, pre-fetching | Save disk space |
|
||||
| Feature | `weed filer.remote.sync` | `remote.copy.local` | `remote.meta.sync` | `remote.cache` | `remote.uncache` |
|
||||
|---------|-------------------------|---------------------|--------------------|----------------|------------------|
|
||||
| **Type** | Long-running daemon | Shell command (batch) | Shell command (batch) | Shell command (batch) | Shell command (batch) |
|
||||
| **Purpose** | Continuous sync (Local → Remote) | Backup local-only files (Local → Remote) | Refresh local index from remote (metadata only) | Download to local cache (Remote → Local) | Free up local storage (Local → Delete) |
|
||||
| **Data Flow** | Local → Remote (metadata + data) | Local → Remote | Remote → Local (metadata only) | Remote → Local | Local-only (remote untouched) |
|
||||
| **Trigger** | Automatic (file events) | Manual / Cron | Manual / Cron | Manual / Cron | Manual / Cron |
|
||||
| **File Scope** | All changes | Local-only files | All files in dir | Files on remote | Cached files |
|
||||
| **Filters** | None (syncs all) | Yes (`include`/`exclude`) | No | Yes (`include`/`exclude`) | Yes (`include`/`exclude`) |
|
||||
| **Force** | Automatic | `-forceUpdate` | N/A | N/A | N/A |
|
||||
| **Dry Run** | No | `-dryRun` | No | `-dryRun` | `-dryRun` |
|
||||
| **Use Case** | Active writes, consistency | Backups, recovery | Detect external uploads to bucket | Warm-up, pre-fetching | Save disk space |
|
||||
|
||||
|
||||
|
||||
|
||||
Reference in new issue
Block a user