test: backend integration#889
Conversation
|
Important Review skippedAuto reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
|
Documentation Updates 1 document(s) were updated by changes in this PR: Zerobyte Volumes: Types, Architecture, and MountingView Changes@@ -6,6 +6,8 @@
## Volume Types
Zerobyte supports [six types of volumes](https://github.com/nicotsx/zerobyte/blob/bad944a2329540088a51f7699d6f53d9ac82137c/app/schemas/volumes.ts#L36-L71):
+
+> **Note**: Mounted remote volumes (NFS, SMB, WebDAV, SFTP, rclone) can expose translated metadata instead of the source system's original ownership and ACL model. Before relying on these volume types for metadata-sensitive backups, read the [Mounted Shares, ACLs, and Metadata Fidelity](https://github.com/nicotsx/zerobyte/blob/main/apps/docs/content/docs/guides/mounted-shares-and-acls.mdx) guide to understand how different backends handle permissions and what to expect during restore operations.
### 1. Directory
- [Direct access to local filesystem paths](https://github.com/nicotsx/zerobyte/blob/bad944a2329540088a51f7699d6f53d9ac82137c/app/schemas/volumes.ts#L36-L40)
@@ -21,8 +23,9 @@
### 3. SMB/CIFS (Windows/Samba Shares)
- [Network shares compatible with Windows file sharing](https://github.com/nicotsx/zerobyte/blob/bad944a2329540088a51f7699d6f53d9ac82137c/app/schemas/volumes.ts#L23-L34)
- Supports both authenticated and guest access
-- Configuration: host, share, username (optional), password (optional), domain (optional), readOnly flag
+- Configuration: host, share, username (optional), password (optional), domain (optional), mapToContainerUidGid (optional), readOnly flag
- [Passwords are escaped for special characters and encrypted before storage](https://github.com/nicotsx/zerobyte/blob/bad944a2329540088a51f7699d6f53d9ac82137c/app/server/modules/backends/smb/smb-backend.ts#L44-L51)
+- The `mapToContainerUidGid` field controls ownership mapping: when true (default), forces all files to appear as owned by the container user/group; when false, uses cifsacl, idsfromsid, and modefromsid options to show server-reported ownership and permissions
### 4. WebDAV
- [HTTP-based distributed file system access](https://github.com/nicotsx/zerobyte/blob/bad944a2329540088a51f7699d6f53d9ac82137c/app/schemas/volumes.ts#L42-L51)
@@ -99,6 +102,9 @@
- Type flag: `-t cifs`
- [Credential handling with support for guest access or username/password](https://github.com/nicotsx/zerobyte/blob/bad944a2329540088a51f7699d6f53d9ac82137c/app/server/modules/backends/smb/smb-backend.ts#L44-L51)
- [Password escaping for special characters (backslashes and commas)](https://github.com/nicotsx/zerobyte/blob/bad944a2329540088a51f7699d6f53d9ac82137c/app/server/modules/backends/smb/smb-backend.ts#L48)
+- Ownership mapping controlled by `mapToContainerUidGid`:
+ - When true (default): Uses `uid` and `gid` mount options to present all files as owned by the container user/group
+ - When false: Uses `cifsacl`, `idsfromsid`, and `modefromsid` options to preserve server-reported ownership and permissions (note: these options may not be supported by all kernels)
#### WebDAV Backend
[WebDAV volumes mount using](https://github.com/nicotsx/zerobyte/blob/bad944a2329540088a51f7699d6f53d9ac82137c/app/server/modules/backends/webdav/webdav-backend.ts):
@@ -180,9 +186,12 @@
"domain": "WORKGROUP",
"vers": "3.0",
"port": 445,
- "readOnly": false
-}
-```
+ "mapToContainerUidGid": false,
+ "readOnly": false
+}
+```
+
+**Note**: The `mapToContainerUidGid` field defaults to `true` if omitted. When set to `false`, the mount uses cifsacl, idsfromsid, and modefromsid options to show server-reported ownership and permissions. See the [Mounted Shares, ACLs, and Metadata Fidelity](https://github.com/nicotsx/zerobyte/blob/main/apps/docs/content/docs/guides/mounted-shares-and-acls.mdx) guide for details on how this affects permission fidelity.
### Directory Volume
[Directory configuration schema](https://github.com/nicotsx/zerobyte/blob/bad944a2329540088a51f7699d6f53d9ac82137c/app/schemas/volumes.ts#L36-L40): |
8f7cedc to
d6d0aa8
Compare
|
Review the following changes in direct dependencies. Learn more about Socket for GitHub. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: d6d0aa8178
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
d6d0aa8 to
3eb4f1c
Compare
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 3eb4f1cc9e
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
Add testing tools to validate mounting / backup / restore on real remote volumes