You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@seatunnel.apache.org by li...@apache.org on 2026/07/29 01:57:19 UTC

(seatunnel) branch dev updated: [Feature][Connector-V2] Add checkpoint-gated post_sync_action and retention for file source continuous discovery (#10563)

This is an automated email from the ASF dual-hosted git repository.

davidzollo pushed a commit to branch dev
in repository https://gitbox.apache.org/repos/asf/seatunnel.git


The following commit(s) were added to refs/heads/dev by this push:
     new 3d4aa03a53 [Feature][Connector-V2] Add checkpoint-gated post_sync_action and retention for file source continuous discovery (#10563)
3d4aa03a53 is described below

commit 3d4aa03a536f6497f6d15a4b4a34ad5904523936
Author: yzeng1618 <yz...@gmail.com>
AuthorDate: Wed Jul 29 09:57:11 2026 +0800

    [Feature][Connector-V2] Add checkpoint-gated post_sync_action and retention for file source continuous discovery (#10563)
    
    Co-authored-by: zengyi <ze...@chinatelecom.cn>
---
 docs/en/connectors/source/FtpFile.md               |   44 +
 docs/en/connectors/source/HdfsFile.md              |  120 ++
 docs/en/connectors/source/LocalFile.md             |   42 +
 docs/en/connectors/source/SftpFile.md              |   44 +
 docs/zh/connectors/source/FtpFile.md               |   44 +
 docs/zh/connectors/source/HdfsFile.md              |  121 ++
 docs/zh/connectors/source/LocalFile.md             |   42 +
 docs/zh/connectors/source/SftpFile.md              |   44 +
 .../api/configuration/ReadableConfigTest.java      |    5 +
 .../file/config/FileBaseSourceOptions.java         |   44 +
 .../FilePostSyncAction.java}                       |   17 +-
 .../file/hadoop/HadoopFileSystemProxy.java         |   34 +-
 .../seatunnel/file/sink/BaseFileSinkWriter.java    |   32 +-
 .../file/source/BaseFileSourceReader.java          |    4 +-
 .../file/source/BaseMultipleTableFileSource.java   |   15 +
 .../file/source/event/FileSplitFinishedEvent.java  |   12 +-
 .../file/source/reader/BinaryReadStrategy.java     |   61 +-
 .../reader/MultipleTableFileSourceReader.java      |    8 +-
 .../seatunnel/file/source/reader/ReadStrategy.java |    4 +
 ...uousMultipleTableFileSourceSplitEnumerator.java | 1221 ++++++++++++++++-
 .../source/state/FileSourceOperationState.java     |  121 ++
 .../file/source/state/FileSourceState.java         |   50 +-
 .../file/hadoop/HadoopFileSystemProxyTest.java     |  104 ++
 .../file/sink/BaseFileSinkWriterTest.java          |   84 ++
 .../source/BaseMultipleTableFileSourceTest.java    |   90 ++
 ...TableFileSourceSplitEnumeratorPostSyncTest.java |  206 +++
 ...MultipleTableFileSourceSplitEnumeratorTest.java | 1402 +++++++++++++++++++-
 .../file/ftp/source/FtpFileSourceFactory.java      |   10 +
 .../file/ftp/system/SeaTunnelFTPFileSystem.java    |    4 +-
 .../seatunnel/file/ftp/FtpFileFactoryTest.java     |   75 +-
 .../file/hdfs/source/HdfsFileSourceFactory.java    |   10 +
 .../seatunnel/file/hdfs/HdfsFileFactoryTest.java   |   61 +
 .../file/local/source/LocalFileSourceFactory.java  |   10 +
 .../seatunnel/file/local/LocalFileFactoryTest.java |   73 +-
 .../file/sftp/source/SftpFileSourceFactory.java    |   10 +
 .../file/sftp/system/SFTPConnectionPool.java       |   96 +-
 .../seatunnel/file/sftp/system/SFTPFileSystem.java |  103 +-
 .../file/sftp/system/SFTPInputStream.java          |   42 +-
 .../seatunnel/file/sftp/SftpFileFactoryTest.java   |   71 +-
 .../file/sftp/system/SFTPConnectionPoolTest.java   |  154 +++
 .../e2e/connector/file/ftp/FtpFileIT.java          |  452 +++++--
 .../text/ftp_binary_update_distcp_continuous.conf  |   16 +-
 ...ary_update_distcp_continuous_non_recursive.conf |   16 +-
 ...update_distcp_continuous_post_sync_backup.conf} |   20 +-
 ...tcp_continuous_post_sync_backup_retention.conf} |   22 +-
 ...update_distcp_continuous_post_sync_delete.conf} |   19 +-
 .../e2e/connector/file/hdfs/HdfsFileIT.java        |  198 ++-
 ...update_distcp_continuous_post_sync_backup.conf} |   37 +-
 ...tcp_continuous_post_sync_backup_retention.conf} |   39 +-
 ...update_distcp_continuous_post_sync_delete.conf} |   36 +-
 .../e2e/connector/file/local/LocalFileIT.java      |  191 ++-
 ...update_distcp_continuous_post_sync_backup.conf} |   17 +-
 ...tcp_continuous_post_sync_backup_retention.conf} |   19 +-
 ...update_distcp_continuous_post_sync_delete.conf} |   16 +-
 .../e2e/connector/file/fstp/SftpFileIT.java        |  248 +++-
 ...update_distcp_continuous_post_sync_backup.conf} |   31 +-
 ...tcp_continuous_post_sync_backup_retention.conf} |   33 +-
 ...update_distcp_continuous_post_sync_delete.conf} |   30 +-
 58 files changed, 5669 insertions(+), 505 deletions(-)

diff --git a/docs/en/connectors/source/FtpFile.md b/docs/en/connectors/source/FtpFile.md
index f89d8a87bc..1d11794f72 100644
--- a/docs/en/connectors/source/FtpFile.md
+++ b/docs/en/connectors/source/FtpFile.md
@@ -90,6 +90,10 @@ If you use SeaTunnel Engine, It automatically integrated the hadoop jar when you
 | compare_mode                | string  | no       | len_mtime                   |
 | update_compare_parallelism  | int     | no       | 8                           |
 | update_compare_bulk_threshold | int   | no       | 0                           |
+| post_sync_action            | string  | no       | none                        |
+| backup_path                 | string  | no       | -                           |
+| retention_max_age           | string  | no       | -                           |
+| retention_check_interval    | string  | no       | 1H                          |
 | common-options              |         | no       | -                           |
 | file_filter_modified_start  | string  | no       | -                           | 
 | file_filter_modified_end    | string  | no       | -                           | 
@@ -555,6 +559,41 @@ Maximum parallelism for sparse target metadata lookups in `sync_mode=update`. Th
 
 A positive value switches comparison to one directory listing when the candidate count under a target parent reaches the threshold. The default `0` disables automatic bulk listing and uses bounded point lookups, avoiding an unexpectedly expensive target directory scan. This behavior applies to all target filesystems. Source filters are applied while entries are listed to reduce peak metadata memory.
 
+### post_sync_action [string]
+
+Only used when `discovery_mode=continuous`. Supported values: `none` (default), `delete`, `backup`. In `discovery_mode=once`, setting `post_sync_action=delete` or `post_sync_action=backup` is rejected during config validation.
+
+- `none`: default behavior, no source-side file operation.
+- `delete`: delete processed source files after `notifyCheckpointComplete`; failed operations are retried on later checkpoints.
+- `backup`: move processed source files to `backup_path` after `notifyCheckpointComplete`; failed operations are retried on later checkpoints.
+
+Before `delete` or `backup`, SeaTunnel renames the source file to a staging/trash path first, then re-checks the file length and modification time. If the version differs after the rename, the file is restored so the next scan can re-discover the changed version.
+
+**mtime granularity limitation**: FTP MDTM resolution is typically 1 second (sometimes 1 minute). The act-then-verify approach narrows but cannot fully eliminate the race window if a same-second, same-length modification occurs. For maximum safety, ensure no concurrent writers are active during post-sync processing, or use `backup` instead of `delete` so the file is recoverable.
+
+**Security note**: When using `post_sync_action=delete` or `backup` with FTP, use a dedicated least-privilege account that only has DELETE/RENAME permission on the watched directory. FTP credentials are transmitted in cleartext, and this feature requires write/delete permissions that increase the blast radius of a credential compromise.
+
+### backup_path [string]
+
+Only used when `post_sync_action=backup`. Processed files are moved to this base path after checkpoint-complete commit, and destination file names include source version suffix to avoid overwrite collision. Phase-1 only supports backup on the same filesystem as `path` (same scheme and authority); cross-filesystem backup is rejected.
+
+`backup_path` must not be the same as `path`, must not be under `path`, and `path` must not be under `backup_path`. Use a dedicated backup directory because retention only manages files created by SeaTunnel with the version suffix.
+
+### retention_max_age [string]
+
+Optional retention policy for `backup_path`. SeaTunnel backup files older than this age are cleaned up during checkpoint-complete retention scans.
+Only valid when `post_sync_action=backup`.
+
+Supported duration formats are shorthand values with `MS`, `S`, `M`, `H`, or `D` suffixes, such as `500MS`, `30S`, `10M`, `12H`, `7D`, and ISO-8601 durations such as `PT1H30M`.
+
+Duration suffixes are case-insensitive: `MS` (milliseconds), `S` (seconds), `M` (minutes), `H` (hours), `D` (days). `M` always means minutes, never months. Invalid values (e.g., `PT7D`, `P1M`) fail config validation with an error.
+
+### retention_check_interval [string]
+
+Retention scan interval, default `1H`. Cleanup runs at most once per interval when `post_sync_action=backup` and `retention_max_age` is configured. Setting `retention_check_interval` without `retention_max_age` has no effect.
+
+Duration suffixes are case-insensitive: `MS`, `S`, `M`, `H`, `D`. `M` always means minutes, never months. Invalid values fail config validation with an error.
+
 ### file_filter_modified_start [string]
 
 File modification time filter. The connector will filter some files base on the last modification start time (include start time). The default data format is `yyyy-MM-dd HH:mm:ss`.
@@ -778,6 +817,11 @@ source {
     target_path = "/seatunnel/watch/dst/"
     update_strategy = "distcp"
     compare_mode = "len_mtime"
+
+    post_sync_action = "backup"
+    backup_path = "/seatunnel/watch/backup/"
+    retention_max_age = "7D"
+    retention_check_interval = "1H"
   }
 }
 sink {
diff --git a/docs/en/connectors/source/HdfsFile.md b/docs/en/connectors/source/HdfsFile.md
index 12b051df1b..42bad28e6d 100644
--- a/docs/en/connectors/source/HdfsFile.md
+++ b/docs/en/connectors/source/HdfsFile.md
@@ -92,6 +92,10 @@ Read data from hdfs file system.
 | compare_mode               | string  | no       | len_mtime                   | Only used when `sync_mode=update`. Supported values: `len_mtime` (default), `checksum` (only valid when `update_strategy=strict`).                                                                                                                                                                                                          |
 | update_compare_parallelism | int     | no       | 8                           | Maximum parallelism for sparse target metadata lookups. Valid range: `1-64`.                                                                                                                                                                                                                                                              |
 | update_compare_bulk_threshold | int  | no       | 0                           | A positive value switches comparison to one directory listing when the candidate count under one target parent reaches the threshold. `0` disables automatic bulk listing.                                                                                                                                                                |
+| post_sync_action           | string  | no       | none                        | Post-sync action in `discovery_mode=continuous`. Supported values: `none` (default), `delete`, `backup`.                                                                                                                                                                                     |
+| backup_path                | string  | no       | -                           | Backup destination base path when `post_sync_action=backup`. It must not overlap with `path`.                                                                                                                                                                                                 |
+| retention_max_age          | string  | no       | -                           | Optional retention age for SeaTunnel backup files in `backup_path`, only valid when `post_sync_action=backup`.                                                                                                                                                                                |
+| retention_check_interval   | string  | no       | 1H                          | Retention scan interval, only effective when `post_sync_action=backup` and `retention_max_age` is configured.                                                                                                                                                                                |
 | common-options             |         | no       | -                           | Source plugin common parameters, please refer to [Source Common Options](../common-options/source-common-options.md) for details.                                                                                                                                                                                                                            |
 | file_filter_modified_start | string  | no       | -                           | File modification time filter. The connector will filter some files base on the last modification start time (include start time). The default data format is `yyyy-MM-dd HH:mm:ss`.                                                                                                                                                          |
 | file_filter_modified_end   | string  | no       | -                           | File modification time filter. The connector will filter some files base on the last modification end time (not include end time). The default data format is `yyyy-MM-dd HH:mm:ss`.                                                                                                                                                          |
@@ -321,6 +325,39 @@ Maximum parallelism for sparse target metadata lookups in `sync_mode=update`. Th
 
 A positive value switches comparison to one directory listing when the candidate count under a target parent reaches the threshold. The default `0` disables automatic bulk listing and uses bounded point lookups, avoiding an unexpectedly expensive target directory scan. This behavior applies to all target filesystems. Source filters are applied while entries are listed to reduce peak metadata memory.
 
+### post_sync_action [string]
+
+Only used when `discovery_mode=continuous`. Supported values: `none` (default), `delete`, `backup`. In `discovery_mode=once`, setting `post_sync_action=delete` or `post_sync_action=backup` is rejected during config validation.
+
+- `none`: default behavior, no source-side file operation.
+- `delete`: delete processed source files after `notifyCheckpointComplete`; failed operations are retried on later checkpoints.
+- `backup`: move processed source files to `backup_path` after `notifyCheckpointComplete`; failed operations are retried on later checkpoints.
+
+Before `delete` or `backup`, SeaTunnel renames the source file to a staging/trash path first, then re-checks the file length and modification time. If the version differs after the rename, the file is restored so the next scan can re-discover the changed version.
+
+**mtime granularity limitation**: The act-then-verify approach narrows but cannot fully eliminate the race window on filesystems with coarse mtime granularity (e.g., FTP MDTM ~1s, local FS on some platforms). If a same-second, same-length modification occurs, the version check may not detect it. For maximum safety on FTP/SFTP, ensure no concurrent writers are active during post-sync processing, or use `backup` instead of `delete` so the file is recoverable.
+
+### backup_path [string]
+
+Only used when `post_sync_action=backup`. Processed files are moved to this base path after checkpoint-complete commit, and destination file names include source version suffix to avoid overwrite collision. Phase-1 only supports backup on the same filesystem as `path` (same scheme and authority); cross-filesystem backup is rejected.
+
+`backup_path` must not be the same as `path`, must not be under `path`, and `path` must not be under `backup_path`. Use a dedicated backup directory because retention only manages files created by SeaTunnel with the version suffix.
+
+### retention_max_age [string]
+
+Optional retention policy for `backup_path`. SeaTunnel backup files older than this age are cleaned up during checkpoint-complete retention scans.
+Only valid when `post_sync_action=backup`.
+
+Duration suffixes are case-insensitive: `MS` (milliseconds), `S` (seconds), `M` (minutes), `H` (hours), `D` (days). `M` always means minutes, never months. ISO-8601 durations like `PT1H30M` are also supported. Invalid values (e.g., `PT7D`, `P1M`) fail config validation with an error.
+
+Supported duration formats are shorthand values with `MS`, `S`, `M`, `H`, or `D` suffixes, such as `500MS`, `30S`, `10M`, `12H`, `7D`, and ISO-8601 durations such as `PT1H30M`.
+
+### retention_check_interval [string]
+
+Retention scan interval, default `1H`. Cleanup runs at most once per interval when `post_sync_action=backup` and `retention_max_age` is configured. Setting `retention_check_interval` without `retention_max_age` has no effect.
+
+Duration suffixes are case-insensitive: `MS`, `S`, `M`, `H`, `D`. `M` always means minutes, never months. Invalid values fail config validation with an error.
+
 ### enable_file_split [boolean]
 
 Turn on the file splitting function, the default is false. It can be selected when the file type is csv, text, json, parquet and non-compressed format.
@@ -474,6 +511,89 @@ source {
     target_path = "/seatunnel/watch/dst/"
     update_strategy = "distcp"
     compare_mode = "len_mtime"
+
+    post_sync_action = "backup"
+    backup_path = "/seatunnel/watch/backup/"
+    retention_max_age = "7D"
+    retention_check_interval = "1H"
+  }
+}
+
+sink {
+  HdfsFile {
+    fs.defaultFS = "hdfs://namenode001"
+    path = "/seatunnel/watch/dst/"
+    tmp_path = "/seatunnel/watch/tmp/"
+    file_format_type = "binary"
+  }
+}
+```
+
+### Incremental Sync (sync_mode=update, binary)
+
+`sync_mode=update` compares files between source and `target_path`, then only reads new/changed files (currently only supports `file_format_type=binary`).
+In most cases, `target_path` should be aligned with sink `path` (same filesystem and same relative paths).
+
+```hocon
+env {
+  parallelism = 1
+  job.mode = "BATCH"
+}
+
+source {
+  HdfsFile {
+    path = "/seatunnel/update/src/"
+    file_format_type = "binary"
+    fs.defaultFS = "hdfs://namenode001"
+
+    sync_mode = "update"
+    target_path = "/seatunnel/update/dst/"
+    update_strategy = "distcp"
+    compare_mode = "len_mtime"
+  }
+}
+
+sink {
+  HdfsFile {
+    fs.defaultFS = "hdfs://namenode001"
+    path = "/seatunnel/update/dst/"
+    tmp_path = "/seatunnel/update/tmp/"
+    file_format_type = "binary"
+  }
+}
+```
+
+### Continuous Discovery (discovery_mode=continuous)
+
+`discovery_mode=continuous` keeps the job running and periodically scans the path for new/changed files (long-running job, recommended to run with `job.mode="STREAMING"`).
+
+**Note:** `discovery_mode=continuous` currently requires `sync_mode="update"` (binary-only) to avoid repeated transfers without keeping an unbounded "seen" state. `target_path` should align with the sink `path` on the same filesystem.
+
+```hocon
+env {
+  parallelism = 1
+  job.mode = "STREAMING"
+}
+
+source {
+  HdfsFile {
+    path = "/seatunnel/watch/src/"
+    file_format_type = "binary"
+    fs.defaultFS = "hdfs://namenode001"
+
+    discovery_mode = "continuous"
+    scan_interval = "10S"
+    start_mode = "latest"
+
+    sync_mode = "update"
+    target_path = "/seatunnel/watch/dst/"
+    update_strategy = "distcp"
+    compare_mode = "len_mtime"
+
+    post_sync_action = "backup"
+    backup_path = "/seatunnel/watch/backup/"
+    retention_max_age = "7D"
+    retention_check_interval = "1H"
   }
 }
 
diff --git a/docs/en/connectors/source/LocalFile.md b/docs/en/connectors/source/LocalFile.md
index 1832575c2a..b270975623 100644
--- a/docs/en/connectors/source/LocalFile.md
+++ b/docs/en/connectors/source/LocalFile.md
@@ -87,6 +87,10 @@ If you use SeaTunnel Engine, It automatically integrated the hadoop jar when you
 | compare_mode               | string  | no       | len_mtime                            |
 | update_compare_parallelism | int     | no       | 8                                    |
 | update_compare_bulk_threshold | int  | no       | 0                                    |
+| post_sync_action           | string  | no       | none                                 |
+| backup_path                | string  | no       | -                                    |
+| retention_max_age          | string  | no       | -                                    |
+| retention_check_interval   | string  | no       | 1H                                   |
 | common-options             |         | no       | -                                    |
 | tables_configs             | list    | no       | used to define a multiple table task |
 | file_filter_modified_start | string  | no       | -                                    |
@@ -523,6 +527,39 @@ Maximum parallelism for sparse target metadata lookups in `sync_mode=update`. Th
 
 A positive value switches comparison to one directory listing when the candidate count under a target parent reaches the threshold. The default `0` disables automatic bulk listing and uses bounded point lookups, avoiding an unexpectedly expensive target directory scan. This behavior applies to all target filesystems. Source filters are applied while entries are listed to reduce peak metadata memory.
 
+### post_sync_action [string]
+
+Only used when `discovery_mode=continuous`. Supported values: `none` (default), `delete`, `backup`. In `discovery_mode=once`, setting `post_sync_action=delete` or `post_sync_action=backup` is rejected during config validation.
+
+- `none`: default behavior, no source-side file operation.
+- `delete`: delete processed source files after `notifyCheckpointComplete`; failed operations are retried on later checkpoints.
+- `backup`: move processed source files to `backup_path` after `notifyCheckpointComplete`; failed operations are retried on later checkpoints.
+
+Before `delete` or `backup`, SeaTunnel renames the source file to a staging/trash path first, then re-checks the file length and modification time. If the version differs after the rename, the file is restored so the next scan can re-discover the changed version.
+
+**mtime granularity limitation**: The local filesystem on some platforms has 1-second mtime granularity. The act-then-verify approach narrows but cannot fully eliminate the race window if a same-second, same-length modification occurs. For maximum safety, ensure no concurrent writers are active during post-sync processing, or use `backup` instead of `delete` so the file is recoverable.
+
+### backup_path [string]
+
+Only used when `post_sync_action=backup`. Processed files are moved to this base path after checkpoint-complete commit, and destination file names include source version suffix to avoid overwrite collision. Phase-1 only supports backup on the same filesystem as `path` (same scheme and authority); cross-filesystem backup is rejected.
+
+`backup_path` must not be the same as `path`, must not be under `path`, and `path` must not be under `backup_path`. Use a dedicated backup directory because retention only manages files created by SeaTunnel with the version suffix.
+
+### retention_max_age [string]
+
+Optional retention policy for `backup_path`. SeaTunnel backup files older than this age are cleaned up during checkpoint-complete retention scans.
+Only valid when `post_sync_action=backup`.
+
+Supported duration formats are shorthand values with `MS`, `S`, `M`, `H`, or `D` suffixes, such as `500MS`, `30S`, `10M`, `12H`, `7D`, and ISO-8601 durations such as `PT1H30M`.
+
+Duration suffixes are case-insensitive: `MS` (milliseconds), `S` (seconds), `M` (minutes), `H` (hours), `D` (days). `M` always means minutes, never months. Invalid values (e.g., `PT7D`, `P1M`) fail config validation with an error.
+
+### retention_check_interval [string]
+
+Retention scan interval, default `1H`. Cleanup runs at most once per interval when `post_sync_action=backup` and `retention_max_age` is configured. Setting `retention_check_interval` without `retention_max_age` has no effect.
+
+Duration suffixes are case-insensitive: `MS`, `S`, `M`, `H`, `D`. `M` always means minutes, never months. Invalid values fail config validation with an error.
+
 ### file_filter_modified_start [string]
 
 File modification time filter. The connector will filter some files base on the last modification start time (include start time). The default data format is `yyyy-MM-dd HH:mm:ss`.
@@ -782,6 +819,11 @@ source {
     target_path = "/seatunnel/watch/dst/"
     update_strategy = "distcp"
     compare_mode = "len_mtime"
+
+    post_sync_action = "backup"
+    backup_path = "/seatunnel/watch/backup/"
+    retention_max_age = "7D"
+    retention_check_interval = "1H"
   }
 }
 sink {
diff --git a/docs/en/connectors/source/SftpFile.md b/docs/en/connectors/source/SftpFile.md
index dd3ad14b61..97596ff268 100644
--- a/docs/en/connectors/source/SftpFile.md
+++ b/docs/en/connectors/source/SftpFile.md
@@ -119,6 +119,10 @@ The File does not have a specific type list, and we can indicate which SeaTunnel
 | compare_mode               | string  | no       | len_mtime                     | Only used when `sync_mode=update`. Supported values: `len_mtime` (default), `checksum` (only valid when `update_strategy=strict`).                                                                                                                                                                                              |
 | update_compare_parallelism | int     | no       | 8                             | Maximum parallelism for sparse target metadata lookups. Valid range: `1-64`.                                                                                                                                                                                                                                                   |
 | update_compare_bulk_threshold | int  | no       | 0                             | A positive value switches comparison to one directory listing when the candidate count under one target parent reaches the threshold. `0` disables automatic bulk listing.                                                                                                                                                     |
+| post_sync_action           | string  | no       | none                          | Post-sync action in `discovery_mode=continuous`. Supported values: `none` (default), `delete`, `backup`.                                                                                                                                                                                                                        |
+| backup_path                | string  | no       | -                             | Backup destination base path when `post_sync_action=backup`. It must not overlap with `path`.                                                                                                                                                                                                                                   |
+| retention_max_age          | string  | no       | -                             | Optional retention age for SeaTunnel backup files in `backup_path`, only valid when `post_sync_action=backup`.                                                                                                                                                                                                                  |
+| retention_check_interval   | string  | no       | 1H                            | Retention scan interval, only effective when `post_sync_action=backup` and `retention_max_age` is configured.                                                                                                                                                                                                                   |
 | common-options             |         | No       | -                             | Source plugin common parameters, please refer to [Source Common Options](../common-options/source-common-options.md) for details.                                                                                                                                                                                                                                                              |
 | file_filter_modified_start | string  | no       | -                             | File modification time filter. The connector will filter some files base on the last modification start time (include start time). The default data format is `yyyy-MM-dd HH:mm:ss`.                                                                                                                                                                                            |
 | file_filter_modified_end   | string  | no       | -                             | File modification time filter. The connector will filter some files base on the last modification end time (not include end time). The default data format is `yyyy-MM-dd HH:mm:ss`.                                                                                                                                                                                            |
@@ -395,6 +399,41 @@ Maximum parallelism for sparse target metadata lookups in `sync_mode=update`. Th
 
 A positive value switches comparison to one directory listing when the candidate count under a target parent reaches the threshold. The default `0` disables automatic bulk listing and uses bounded point lookups, avoiding an unexpectedly expensive target directory scan. This behavior applies to all target filesystems. Source filters are applied while entries are listed to reduce peak metadata memory. A flat SFTP directory must still return all entries because SFTP `READDIR` has no server- [...]
 
+### post_sync_action [string]
+
+Only used when `discovery_mode=continuous`. Supported values: `none` (default), `delete`, `backup`. In `discovery_mode=once`, setting `post_sync_action=delete` or `post_sync_action=backup` is rejected during config validation.
+
+- `none`: default behavior, no source-side file operation.
+- `delete`: delete processed source files after `notifyCheckpointComplete`; failed operations are retried on later checkpoints.
+- `backup`: move processed source files to `backup_path` after `notifyCheckpointComplete`; failed operations are retried on later checkpoints.
+
+Before `delete` or `backup`, SeaTunnel renames the source file to a staging/trash path first, then re-checks the file length and modification time. If the version differs after the rename, the file is restored so the next scan can re-discover the changed version.
+
+**mtime granularity limitation**: SFTP mtime resolution is typically 1 second. The act-then-verify approach narrows but cannot fully eliminate the race window if a same-second, same-length modification occurs. For maximum safety, ensure no concurrent writers are active during post-sync processing, or use `backup` instead of `delete` so the file is recoverable.
+
+**Security note**: When using `post_sync_action=delete` or `backup` with SFTP, use a dedicated least-privilege account that only has DELETE/RENAME permission on the watched directory. This feature requires write/delete permissions that increase the blast radius of a credential compromise.
+
+### backup_path [string]
+
+Only used when `post_sync_action=backup`. Processed files are moved to this base path after checkpoint-complete commit, and destination file names include source version suffix to avoid overwrite collision. Phase-1 only supports backup on the same filesystem as `path` (same scheme and authority); cross-filesystem backup is rejected.
+
+`backup_path` must not be the same as `path`, must not be under `path`, and `path` must not be under `backup_path`. Use a dedicated backup directory because retention only manages files created by SeaTunnel with the version suffix.
+
+### retention_max_age [string]
+
+Optional retention policy for `backup_path`. SeaTunnel backup files older than this age are cleaned up during checkpoint-complete retention scans.
+Only valid when `post_sync_action=backup`.
+
+Supported duration formats are shorthand values with `MS`, `S`, `M`, `H`, or `D` suffixes, such as `500MS`, `30S`, `10M`, `12H`, `7D`, and ISO-8601 durations such as `PT1H30M`.
+
+Duration suffixes are case-insensitive: `MS` (milliseconds), `S` (seconds), `M` (minutes), `H` (hours), `D` (days). `M` always means minutes, never months. Invalid values (e.g., `PT7D`, `P1M`) fail config validation with an error.
+
+### retention_check_interval [string]
+
+Retention scan interval, default `1H`. Cleanup runs at most once per interval when `post_sync_action=backup` and `retention_max_age` is configured. Setting `retention_check_interval` without `retention_max_age` has no effect.
+
+Duration suffixes are case-insensitive: `MS`, `S`, `M`, `H`, `D`. `M` always means minutes, never months. Invalid values fail config validation with an error.
+
 ### quote_char [string]
 
 A single character that encloses CSV fields, allowing fields with commas, line breaks, or quotes to be read correctly.
@@ -638,6 +677,11 @@ source {
     target_path = "tmp/seatunnel/watch/dst"
     update_strategy = "distcp"
     compare_mode = "len_mtime"
+
+    post_sync_action = "backup"
+    backup_path = "tmp/seatunnel/watch/backup"
+    retention_max_age = "7D"
+    retention_check_interval = "1H"
   }
 }
 
diff --git a/docs/zh/connectors/source/FtpFile.md b/docs/zh/connectors/source/FtpFile.md
index d62be8eb62..874f5a766c 100644
--- a/docs/zh/connectors/source/FtpFile.md
+++ b/docs/zh/connectors/source/FtpFile.md
@@ -87,6 +87,10 @@ import ChangeLog from '../changelog/connector-file-ftp.md';
 | compare_mode                | string  | 否    | len_mtime           |
 | update_compare_parallelism  | int     | 否    | 8                   |
 | update_compare_bulk_threshold | int   | 否    | 0                   |
+| post_sync_action            | string  | 否    | none                |
+| backup_path                 | string  | 否    | -                   |
+| retention_max_age           | string  | 否    | -                   |
+| retention_check_interval    | string  | 否    | 1H                  |
 | common-options              |         | 否    | -                   |
 | file_filter_modified_start  | string  | 否    | -                   | 
 | file_filter_modified_end    | string  | 否    | -                   | 
@@ -526,6 +530,41 @@ compare_mode = "len_mtime"
 
 设置正数后,同一目标父目录的候选文件达到该阈值时,SeaTunnel 改为只枚举一次目标目录。默认值 `0` 表示关闭自动批量枚举,使用有界并发点查,避免意外扫描庞大的目标目录。该行为适用于所有目标文件系统。源端会边枚举边过滤,以降低元数据峰值内存。
 
+### post_sync_action [string]
+
+仅在 `discovery_mode=continuous` 时使用。支持:`none`(默认)、`delete`、`backup`。当 `discovery_mode=once` 时,若配置 `post_sync_action=delete` 或 `post_sync_action=backup`,会在配置校验阶段被显式拒绝。
+
+- `none`:默认行为,不对源文件执行运维动作。
+- `delete`:在 `notifyCheckpointComplete` 后删除已处理源文件;失败动作会在后续 checkpoint 回调中重试。
+- `backup`:在 `notifyCheckpointComplete` 后将已处理源文件移动到 `backup_path`;失败动作会在后续 checkpoint 回调中重试。
+
+执行 `delete` 或 `backup` 前,SeaTunnel 会先将源文件重命名到 staging/trash 路径,然后重新检查文件长度和修改时间。如果重命名后版本不一致,文件会被恢复到原路径,以便后续扫描重新发现变更后的文件。
+
+**mtime 粒度限制**:FTP MDTM 分辨率通常为 1 秒(有时为 1 分钟)。act-then-verify 方式缩小了但不能完全消除同秒同长度修改的竞态窗口。为了最大安全性,请确保 post-sync 处理期间没有并发写入,或使用 `backup` 而非 `delete` 以便文件可恢复。
+
+**安全提示**:在 FTP 上使用 `post_sync_action=delete` 或 `backup` 时,建议使用专用最小权限账户,仅对监控目录有 DELETE/RENAME 权限。FTP 凭证以明文传输,此功能需要写/删权限,会增加凭证泄露后的影响范围。
+
+### backup_path [string]
+
+仅在 `post_sync_action=backup` 时使用。在 checkpoint 完成提交后,已处理文件会移动到该基础路径,目标文件名会附带源文件版本后缀以避免覆盖冲突。phase-1 仅支持与 `path` 同文件系统(scheme + authority 相同)的 backup,跨文件系统 backup 会被显式拒绝。
+
+`backup_path` 不能与 `path` 相同,不能位于 `path` 之下,`path` 也不能位于 `backup_path` 之下。建议使用专用备份目录,因为保留清理只会管理带 SeaTunnel 版本后缀的备份文件。
+
+### retention_max_age [string]
+
+`backup_path` 的可选保留策略。超过该时长的 SeaTunnel 备份文件会在 checkpoint 完成后的保留扫描中被清理。
+仅在 `post_sync_action=backup` 时有效。
+
+支持的时长格式包括带 `MS`、`S`、`M`、`H`、`D` 后缀的简写格式,例如 `500MS`、`30S`、`10M`、`12H`、`7D`,也支持 ISO-8601 时长,例如 `PT1H30M`。
+
+时长后缀不区分大小写:`MS`(毫秒)、`S`(秒)、`M`(分钟)、`H`(小时)、`D`(天)。`M` 始终表示分钟,不是月份。非法值(如 `PT7D`、`P1M`)会导致配置校验失败并报错。
+
+### retention_check_interval [string]
+
+保留清理扫描间隔,默认 `1H`。仅在 `post_sync_action=backup` 且配置 `retention_max_age` 后生效,清理任务最多按该间隔执行一次。单独设置 `retention_check_interval` 不会产生效果。
+
+时长后缀不区分大小写:`MS`、`S`、`M`、`H`、`D`。`M` 始终表示分钟,不是月份。非法值会导致配置校验失败并报错。
+
 ### file_filter_modified_start
 
 按照最后修改时间过滤文件。 要过滤的开始时间(包括改时间),时间格式是:`yyyy-MM-dd HH:mm:ss`。
@@ -747,6 +786,11 @@ source {
     target_path = "/seatunnel/watch/dst/"
     update_strategy = "distcp"
     compare_mode = "len_mtime"
+
+    post_sync_action = "backup"
+    backup_path = "/seatunnel/watch/backup/"
+    retention_max_age = "7D"
+    retention_check_interval = "1H"
   }
 }
 sink {
diff --git a/docs/zh/connectors/source/HdfsFile.md b/docs/zh/connectors/source/HdfsFile.md
index f81b575d59..180bb911c2 100644
--- a/docs/zh/connectors/source/HdfsFile.md
+++ b/docs/zh/connectors/source/HdfsFile.md
@@ -92,6 +92,10 @@ import ChangeLog from '../changelog/connector-file-hadoop.md';
 | compare_mode               | string  | 否    | len_mtime           | 仅在 `sync_mode=update` 时使用。支持:`len_mtime`(默认)、`checksum`(仅在 `update_strategy=strict` 时可用)。                                                                                                             |
 | update_compare_parallelism | int     | 否    | 8                   | 稀疏目标元数据点查的最大并发数,有效范围为 `1-64`。                                                                                                                                                                       |
 | update_compare_bulk_threshold | int  | 否    | 0                   | 设置正数后,同一目标父目录达到该候选数时切换为单次目录枚举;`0` 表示关闭自动批量枚举。                                                                                                                                     |
+| post_sync_action           | string  | 否    | none                | `discovery_mode=continuous` 下的后置运维动作,支持:`none`(默认)、`delete`、`backup`。                                                                                                                              |
+| backup_path                | string  | 否    | -                   | `post_sync_action=backup` 时的备份目标基础路径,不能与 `path` 重叠。                                                                                                                                                 |
+| retention_max_age          | string  | 否    | -                   | `backup_path` 中 SeaTunnel 备份文件的可选保留时长,仅在 `post_sync_action=backup` 时有效。                                                                                                                         |
+| retention_check_interval   | string  | 否    | 1H                  | 保留清理扫描间隔,仅在 `post_sync_action=backup` 且配置 `retention_max_age` 时生效。                                                                                                                                 |
 | common-options             |         | 否    | -                   | 数据源插件通用参数,请参阅 [数据源通用选项](../common-options/source-common-options.md) 了解详情。                                                                                                                       |
 | file_filter_modified_start | string  | 否    | -                   | 按照最后修改时间过滤文件。 要过滤的开始时间(包括改时间),时间格式是:`yyyy-MM-dd HH:mm:ss`                                                                                                                        |
 | file_filter_modified_end   | string  | 否    | -                   | 按照最后修改时间过滤文件。 要过滤的结束时间(不包括改时间),时间格式是:`yyyy-MM-dd HH:mm:ss`                                                                                                                       |
@@ -321,6 +325,40 @@ abc.*
 
 设置正数后,同一目标父目录的候选文件达到该阈值时,SeaTunnel 改为只枚举一次目标目录。默认值 `0` 表示关闭自动批量枚举,使用有界并发点查,避免意外扫描庞大的目标目录。该行为适用于所有目标文件系统。源端会边枚举边过滤,以降低元数据峰值内存。
 
+### post_sync_action [string]
+
+仅在 `discovery_mode=continuous` 时使用。支持:`none`(默认)、`delete`、`backup`。当 `discovery_mode=once` 时,若配置 `post_sync_action=delete` 或 `post_sync_action=backup`,会在配置校验阶段被显式拒绝。
+
+- `none`:默认行为,不对源文件执行运维动作。
+- `delete`:在 `notifyCheckpointComplete` 后删除已处理源文件;失败动作会在后续 checkpoint 回调中重试。
+- `backup`:在 `notifyCheckpointComplete` 后将已处理源文件移动到 `backup_path`;失败动作会在后续 checkpoint 回调中重试。
+
+执行 `delete` 或 `backup` 前,SeaTunnel 会先将源文件重命名到 staging/trash 路径,然后重新检查文件长度和修改时间。如果重命名后版本不一致,文件会被恢复到原路径,以便后续扫描重新发现变更后的文件。
+
+**mtime 粒度限制**:act-then-verify 方式缩小了但不能完全消除粗粒度 mtime 文件系统上的竞态窗口(如 FTP MDTM ~1秒,某些平台的本地 FS)。如果发生同秒同长度的修改,版本检查可能无法检测到。在 FTP/SFTP 上为了最大安全性,请确保 post-sync 处理期间没有并发写入,或使用 `backup` 而非 `delete` 以便文件可恢复。
+
+### backup_path [string]
+
+仅在 `post_sync_action=backup` 时使用。在 checkpoint 完成提交后,已处理文件会移动到该基础路径,目标文件名会附带源文件版本后缀以避免覆盖冲突。phase-1 仅支持与 `path` 同文件系统(scheme + authority 相同)的 backup,跨文件系统 backup 会被显式拒绝。
+
+`backup_path` 不能与 `path` 相同,不能位于 `path` 之下,`path` 也不能位于 `backup_path` 之下。建议使用专用备份目录,因为保留清理只会管理带 SeaTunnel 版本后缀的备份文件。
+
+### retention_max_age [string]
+
+`backup_path` 的可选保留策略。超过该时长的 SeaTunnel 备份文件会在 checkpoint 完成后的保留扫描中被清理。
+仅在 `post_sync_action=backup` 时有效。
+
+时长后缀不区分大小写:`MS`(毫秒)、`S`(秒)、`M`(分钟)、`H`(小时)、`D`(天)。`M` 始终表示分钟,不是月份。也支持 ISO-8601 格式如 `PT1H30M`。非法值(如 `PT7D`、`P1M`)会导致配置校验失败并报错。
+仅在 `post_sync_action=backup` 时有效。
+
+支持的时长格式包括带 `MS`、`S`、`M`、`H`、`D` 后缀的简写格式,例如 `500MS`、`30S`、`10M`、`12H`、`7D`,也支持 ISO-8601 时长,例如 `PT1H30M`。
+
+### retention_check_interval [string]
+
+保留清理扫描间隔,默认 `1H`。仅在 `post_sync_action=backup` 且配置 `retention_max_age` 后生效,清理任务最多按该间隔执行一次。单独设置 `retention_check_interval` 不会产生效果。
+
+支持的时长格式与 `retention_max_age` 相同,例如 `1H` 或 `PT30M`。
+
 ### enable_file_split [boolean]
 
 开启大文件拆分功能,默认 false。仅支持 `csv`/`text`/`json`/`parquet` 且非压缩格式(`compress_codec=none` 且 `archive_compress_codec=none`)。
@@ -490,6 +528,89 @@ source {
     target_path = "/seatunnel/watch/dst/"
     update_strategy = "distcp"
     compare_mode = "len_mtime"
+
+    post_sync_action = "backup"
+    backup_path = "/seatunnel/watch/backup/"
+    retention_max_age = "7D"
+    retention_check_interval = "1H"
+  }
+}
+
+sink {
+  HdfsFile {
+    fs.defaultFS = "hdfs://namenode001"
+    path = "/seatunnel/watch/dst/"
+    tmp_path = "/seatunnel/watch/tmp/"
+    file_format_type = "binary"
+  }
+}
+```
+
+### 增量同步(sync_mode=update,仅 binary)
+
+`sync_mode=update` 会对比 source 与 `target_path`,仅读取新增/变更文件(目前仅支持 `file_format_type=binary`)。
+多数情况下,`target_path` 需要与 sink 的 `path` 对齐(同一文件系统、相同相对路径)。
+
+```hocon
+env {
+  parallelism = 1
+  job.mode = "BATCH"
+}
+
+source {
+  HdfsFile {
+    path = "/seatunnel/update/src/"
+    file_format_type = "binary"
+    fs.defaultFS = "hdfs://namenode001"
+
+    sync_mode = "update"
+    target_path = "/seatunnel/update/dst/"
+    update_strategy = "distcp"
+    compare_mode = "len_mtime"
+  }
+}
+
+sink {
+  HdfsFile {
+    fs.defaultFS = "hdfs://namenode001"
+    path = "/seatunnel/update/dst/"
+    tmp_path = "/seatunnel/update/tmp/"
+    file_format_type = "binary"
+  }
+}
+```
+
+### 持续发现(discovery_mode=continuous)
+
+`discovery_mode=continuous` 会让作业保持运行,并按间隔持续扫描路径发现新/变更文件(长跑作业,推荐使用 `job.mode="STREAMING"`)。
+
+**注意:** `discovery_mode=continuous` 当前需要配合 `sync_mode="update"`(仅支持 binary)使用,以避免重复传输而不引入无限增长的“已处理状态”。同时 `target_path` 通常应与 sink 的 `path` 保持一致(同一文件系统、相同相对路径)。
+
+```hocon
+env {
+  parallelism = 1
+  job.mode = "STREAMING"
+}
+
+source {
+  HdfsFile {
+    path = "/seatunnel/watch/src/"
+    file_format_type = "binary"
+    fs.defaultFS = "hdfs://namenode001"
+
+    discovery_mode = "continuous"
+    scan_interval = "10S"
+    start_mode = "latest"
+
+    sync_mode = "update"
+    target_path = "/seatunnel/watch/dst/"
+    update_strategy = "distcp"
+    compare_mode = "len_mtime"
+
+    post_sync_action = "backup"
+    backup_path = "/seatunnel/watch/backup/"
+    retention_max_age = "7D"
+    retention_check_interval = "1H"
   }
 }
 
diff --git a/docs/zh/connectors/source/LocalFile.md b/docs/zh/connectors/source/LocalFile.md
index 25a7e44c3a..8cd76a60a3 100644
--- a/docs/zh/connectors/source/LocalFile.md
+++ b/docs/zh/connectors/source/LocalFile.md
@@ -87,6 +87,10 @@ import ChangeLog from '../changelog/connector-file-local.md';
 | compare_mode               | string  | 否    | len_mtime           |
 | update_compare_parallelism | int     | 否    | 8                   |
 | update_compare_bulk_threshold | int  | 否    | 0                   |
+| post_sync_action           | string  | 否    | none                |
+| backup_path                | string  | 否    | -                   |
+| retention_max_age          | string  | 否    | -                   |
+| retention_check_interval   | string  | 否    | 1H                  |
 | common-options             |         | 否    | -                   |
 | tables_configs             | list    | 否    | 用于定义多表任务            |
 | file_filter_modified_start | string  | 否    | -                   | 
@@ -523,6 +527,39 @@ compare_mode = "len_mtime"
 
 设置正数后,同一目标父目录的候选文件达到该阈值时,SeaTunnel 改为只枚举一次目标目录。默认值 `0` 表示关闭自动批量枚举,使用有界并发点查,避免意外扫描庞大的目标目录。该行为适用于所有目标文件系统。源端会边枚举边过滤,以降低元数据峰值内存。
 
+### post_sync_action [string]
+
+仅在 `discovery_mode=continuous` 时使用。支持:`none`(默认)、`delete`、`backup`。当 `discovery_mode=once` 时,若配置 `post_sync_action=delete` 或 `post_sync_action=backup`,会在配置校验阶段被显式拒绝。
+
+- `none`:默认行为,不对源文件执行运维动作。
+- `delete`:在 `notifyCheckpointComplete` 后删除已处理源文件;失败动作会在后续 checkpoint 回调中重试。
+- `backup`:在 `notifyCheckpointComplete` 后将已处理源文件移动到 `backup_path`;失败动作会在后续 checkpoint 回调中重试。
+
+执行 `delete` 或 `backup` 前,SeaTunnel 会先将源文件重命名到 staging/trash 路径,然后重新检查文件长度和修改时间。如果重命名后版本不一致,文件会被恢复到原路径,以便后续扫描重新发现变更后的文件。
+
+**mtime 粒度限制**:某些平台的本地文件系统 mtime 粒度为 1 秒。act-then-verify 方式缩小了但不能完全消除同秒同长度修改的竞态窗口。为了最大安全性,请确保 post-sync 处理期间没有并发写入,或使用 `backup` 而非 `delete` 以便文件可恢复。
+
+### backup_path [string]
+
+仅在 `post_sync_action=backup` 时使用。在 checkpoint 完成提交后,已处理文件会移动到该基础路径,目标文件名会附带源文件版本后缀以避免覆盖冲突。phase-1 仅支持与 `path` 同文件系统(scheme + authority 相同)的 backup,跨文件系统 backup 会被显式拒绝。
+
+`backup_path` 不能与 `path` 相同,不能位于 `path` 之下,`path` 也不能位于 `backup_path` 之下。建议使用专用备份目录,因为保留清理只会管理带 SeaTunnel 版本后缀的备份文件。
+
+### retention_max_age [string]
+
+`backup_path` 的可选保留策略。超过该时长的 SeaTunnel 备份文件会在 checkpoint 完成后的保留扫描中被清理。
+仅在 `post_sync_action=backup` 时有效。
+
+支持的时长格式包括带 `MS`、`S`、`M`、`H`、`D` 后缀的简写格式,例如 `500MS`、`30S`、`10M`、`12H`、`7D`,也支持 ISO-8601 时长,例如 `PT1H30M`。
+
+时长后缀不区分大小写:`MS`(毫秒)、`S`(秒)、`M`(分钟)、`H`(小时)、`D`(天)。`M` 始终表示分钟,不是月份。非法值(如 `PT7D`、`P1M`)会导致配置校验失败并报错。
+
+### retention_check_interval [string]
+
+保留清理扫描间隔,默认 `1H`。仅在 `post_sync_action=backup` 且配置 `retention_max_age` 后生效,清理任务最多按该间隔执行一次。单独设置 `retention_check_interval` 不会产生效果。
+
+时长后缀不区分大小写:`MS`、`S`、`M`、`H`、`D`。`M` 始终表示分钟,不是月份。非法值会导致配置校验失败并报错。
+
 ### file_filter_modified_start
 
 按照最后修改时间过滤文件。 要过滤的开始时间(包括改时间),时间格式是:`yyyy-MM-dd HH:mm:ss`。
@@ -781,6 +818,11 @@ source {
     target_path = "/seatunnel/watch/dst/"
     update_strategy = "distcp"
     compare_mode = "len_mtime"
+
+    post_sync_action = "backup"
+    backup_path = "/seatunnel/watch/backup/"
+    retention_max_age = "7D"
+    retention_check_interval = "1H"
   }
 }
 sink {
diff --git a/docs/zh/connectors/source/SftpFile.md b/docs/zh/connectors/source/SftpFile.md
index c833c7a71b..58af1adb4a 100644
--- a/docs/zh/connectors/source/SftpFile.md
+++ b/docs/zh/connectors/source/SftpFile.md
@@ -119,6 +119,10 @@ import ChangeLog from '../changelog/connector-file-sftp.md';
 | compare_mode               | string  | 否    | len_mtime           | 仅在 `sync_mode=update` 时使用。支持:`len_mtime`(默认)、`checksum`(仅在 `update_strategy=strict` 时可用)。                                                                                                                                             |
 | update_compare_parallelism | int     | 否    | 8                   | 稀疏目标元数据点查的最大并发数,有效范围为 `1-64`。                                                                                                                                                                                                       |
 | update_compare_bulk_threshold | int  | 否    | 0                   | 设置正数后,同一目标父目录达到该候选数时切换为单次目录枚举;`0` 表示关闭自动批量枚举。                                                                                                                                                                     |
+| post_sync_action           | string  | 否    | none                | `discovery_mode=continuous` 下的后置运维动作,支持:`none`(默认)、`delete`、`backup`。                                                                                                                                                             |
+| backup_path                | string  | 否    | -                   | `post_sync_action=backup` 时的备份目标基础路径,不能与 `path` 重叠。                                                                                                                                                                                   |
+| retention_max_age          | string  | 否    | -                   | `backup_path` 中 SeaTunnel 备份文件的可选保留时长,仅在 `post_sync_action=backup` 时有效。                                                                                                                                                            |
+| retention_check_interval   | string  | 否    | 1H                  | 保留清理扫描间隔,仅在 `post_sync_action=backup` 且配置 `retention_max_age` 时生效。                                                                                                                                                                    |
 | common-options             |         | 否    | -                   | 数据源插件通用参数,请参考[数据源通用选项](../common-options/source-common-options.md)了解详情。                                                                                                                                                                                           |
 | file_filter_modified_start | string  | 否    | -                   | 按照最后修改时间过滤文件。 要过滤的开始时间(包括改时间),时间格式是:`yyyy-MM-dd HH:mm:ss`                                                                                                                                                                                          |
 | file_filter_modified_end   | string  | 否    | -                   | 按照最后修改时间过滤文件。 要过滤的结束时间(不包括改时间),时间格式是:`yyyy-MM-dd HH:mm:ss`                                                                                                                                                                                         |
@@ -395,6 +399,41 @@ compare_mode = "len_mtime"
 
 设置正数后,同一目标父目录的候选文件达到该阈值时,SeaTunnel 改为只枚举一次目标目录。默认值 `0` 表示关闭自动批量枚举,使用有界并发点查,避免意外扫描庞大的目标目录。该行为适用于所有目标文件系统。源端会边枚举边过滤,以降低元数据峰值内存;但 SFTP 平铺目录仍需返回全部条目,因为标准 `READDIR` 不支持服务端按修改时间过滤。
 
+### post_sync_action [string]
+
+仅在 `discovery_mode=continuous` 时使用。支持:`none`(默认)、`delete`、`backup`。当 `discovery_mode=once` 时,若配置 `post_sync_action=delete` 或 `post_sync_action=backup`,会在配置校验阶段被显式拒绝。
+
+- `none`:默认行为,不对源文件执行运维动作。
+- `delete`:在 `notifyCheckpointComplete` 后删除已处理源文件;失败动作会在后续 checkpoint 回调中重试。
+- `backup`:在 `notifyCheckpointComplete` 后将已处理源文件移动到 `backup_path`;失败动作会在后续 checkpoint 回调中重试。
+
+执行 `delete` 或 `backup` 前,SeaTunnel 会先将源文件重命名到 staging/trash 路径,然后重新检查文件长度和修改时间。如果重命名后版本不一致,文件会被恢复到原路径,以便后续扫描重新发现变更后的文件。
+
+**mtime 粒度限制**:SFTP mtime 分辨率通常为 1 秒。act-then-verify 方式缩小了但不能完全消除同秒同长度修改的竞态窗口。为了最大安全性,请确保 post-sync 处理期间没有并发写入,或使用 `backup` 而非 `delete` 以便文件可恢复。
+
+**安全提示**:在 SFTP 上使用 `post_sync_action=delete` 或 `backup` 时,建议使用专用最小权限账户,仅对监控目录有 DELETE/RENAME 权限。此功能需要写/删权限,会增加凭证泄露后的影响范围。
+
+### backup_path [string]
+
+仅在 `post_sync_action=backup` 时使用。在 checkpoint 完成提交后,已处理文件会移动到该基础路径,目标文件名会附带源文件版本后缀以避免覆盖冲突。phase-1 仅支持与 `path` 同文件系统(scheme + authority 相同)的 backup,跨文件系统 backup 会被显式拒绝。
+
+`backup_path` 不能与 `path` 相同,不能位于 `path` 之下,`path` 也不能位于 `backup_path` 之下。建议使用专用备份目录,因为保留清理只会管理带 SeaTunnel 版本后缀的备份文件。
+
+### retention_max_age [string]
+
+`backup_path` 的可选保留策略。超过该时长的 SeaTunnel 备份文件会在 checkpoint 完成后的保留扫描中被清理。
+仅在 `post_sync_action=backup` 时有效。
+
+支持的时长格式包括带 `MS`、`S`、`M`、`H`、`D` 后缀的简写格式,例如 `500MS`、`30S`、`10M`、`12H`、`7D`,也支持 ISO-8601 时长,例如 `PT1H30M`。
+
+时长后缀不区分大小写:`MS`(毫秒)、`S`(秒)、`M`(分钟)、`H`(小时)、`D`(天)。`M` 始终表示分钟,不是月份。非法值(如 `PT7D`、`P1M`)会导致配置校验失败并报错。
+
+### retention_check_interval [string]
+
+保留清理扫描间隔,默认 `1H`。仅在 `post_sync_action=backup` 且配置 `retention_max_age` 后生效,清理任务最多按该间隔执行一次。单独设置 `retention_check_interval` 不会产生效果。
+
+时长后缀不区分大小写:`MS`、`S`、`M`、`H`、`D`。`M` 始终表示分钟,不是月份。非法值会导致配置校验失败并报错。
+
 ### schema [config]
 
 #### fields [Config]
@@ -629,6 +668,11 @@ source {
     target_path = "tmp/seatunnel/watch/dst"
     update_strategy = "distcp"
     compare_mode = "len_mtime"
+
+    post_sync_action = "backup"
+    backup_path = "tmp/seatunnel/watch/backup"
+    retention_max_age = "7D"
+    retention_check_interval = "1H"
   }
 }
 
diff --git a/seatunnel-api/src/test/java/org/apache/seatunnel/api/configuration/ReadableConfigTest.java b/seatunnel-api/src/test/java/org/apache/seatunnel/api/configuration/ReadableConfigTest.java
index d93de644a4..24bd843ee7 100644
--- a/seatunnel-api/src/test/java/org/apache/seatunnel/api/configuration/ReadableConfigTest.java
+++ b/seatunnel-api/src/test/java/org/apache/seatunnel/api/configuration/ReadableConfigTest.java
@@ -193,6 +193,11 @@ public class ReadableConfigTest {
         Assertions.assertThrows(
                 IllegalArgumentException.class,
                 () -> ReadonlyConfig.fromMap(optionMap).get(durationOption));
+
+        optionMap.put("option.duration", "PT7D");
+        Assertions.assertThrows(
+                IllegalArgumentException.class,
+                () -> ReadonlyConfig.fromMap(optionMap).get(durationOption));
     }
 
     @Test
diff --git a/seatunnel-connectors-v2/connector-file/connector-file-base/src/main/java/org/apache/seatunnel/connectors/seatunnel/file/config/FileBaseSourceOptions.java b/seatunnel-connectors-v2/connector-file/connector-file-base/src/main/java/org/apache/seatunnel/connectors/seatunnel/file/config/FileBaseSourceOptions.java
index 8a5229ae3a..64082dd489 100644
--- a/seatunnel-connectors-v2/connector-file/connector-file-base/src/main/java/org/apache/seatunnel/connectors/seatunnel/file/config/FileBaseSourceOptions.java
+++ b/seatunnel-connectors-v2/connector-file/connector-file-base/src/main/java/org/apache/seatunnel/connectors/seatunnel/file/config/FileBaseSourceOptions.java
@@ -229,6 +229,50 @@ public class FileBaseSourceOptions extends FileBaseOptions {
                                     + "sync_mode=update comparison from point lookups to one directory listing. "
                                     + "The default 0 disables automatic bulk listing for non-FTP/SFTP targets; "
                                     + "positive values enable it.");
+
+    public static final Option<FilePostSyncAction> POST_SYNC_ACTION =
+            Options.key("post_sync_action")
+                    .singleChoice(
+                            FilePostSyncAction.class,
+                            Arrays.asList(
+                                    FilePostSyncAction.NONE,
+                                    FilePostSyncAction.DELETE,
+                                    FilePostSyncAction.BACKUP))
+                    .defaultValue(FilePostSyncAction.NONE)
+                    .withDescription(
+                            "Post-sync action after successful processing in discovery_mode=continuous. "
+                                    + "Supported values: none (default), delete, backup. "
+                                    + "The default none preserves existing behavior and performs no source-side file operation.");
+
+    public static final Option<String> BACKUP_PATH =
+            Options.key("backup_path")
+                    .stringType()
+                    .noDefaultValue()
+                    .withDescription(
+                            "Backup base path for post_sync_action=backup. "
+                                    + "Used as the destination path when moving processed source files. "
+                                    + "It must not overlap with path.");
+
+    public static final Option<Duration> RETENTION_MAX_AGE =
+            Options.key("retention_max_age")
+                    .durationType()
+                    .noDefaultValue()
+                    .withDescription(
+                            "Maximum age for SeaTunnel backup files in backup_path before cleanup. "
+                                    + "Only valid when post_sync_action=backup. "
+                                    + "Duration suffixes are case-insensitive: MS (milliseconds), S (seconds), M (minutes), H (hours), D (days). "
+                                    + "M always means minutes, never months. ISO-8601 durations like PT1H30M are also supported. "
+                                    + "Invalid values (e.g., PT7D, P1M) fail config validation with an error.");
+
+    public static final Option<Duration> RETENTION_CHECK_INTERVAL =
+            Options.key("retention_check_interval")
+                    .durationType()
+                    .defaultValue(Duration.ofHours(1))
+                    .withDescription(
+                            "Retention scan interval for backup cleanup. "
+                                    + "Only effective when post_sync_action=backup and retention_max_age is configured. "
+                                    + "Duration suffixes are case-insensitive: MS, S, M, H, D. "
+                                    + "M always means minutes, never months. Invalid values fail config validation.");
     public static final Option<String> QUOTE_CHAR =
             Options.key("quote_char")
                     .stringType()
diff --git a/seatunnel-connectors-v2/connector-file/connector-file-base/src/main/java/org/apache/seatunnel/connectors/seatunnel/file/source/event/FileSplitFinishedEvent.java b/seatunnel-connectors-v2/connector-file/connector-file-base/src/main/java/org/apache/seatunnel/connectors/seatunnel/file/config/FilePostSyncAction.java
similarity index 68%
copy from seatunnel-connectors-v2/connector-file/connector-file-base/src/main/java/org/apache/seatunnel/connectors/seatunnel/file/source/event/FileSplitFinishedEvent.java
copy to seatunnel-connectors-v2/connector-file/connector-file-base/src/main/java/org/apache/seatunnel/connectors/seatunnel/file/config/FilePostSyncAction.java
index f0eeeca681..b460d965c4 100644
--- a/seatunnel-connectors-v2/connector-file/connector-file-base/src/main/java/org/apache/seatunnel/connectors/seatunnel/file/source/event/FileSplitFinishedEvent.java
+++ b/seatunnel-connectors-v2/connector-file/connector-file-base/src/main/java/org/apache/seatunnel/connectors/seatunnel/file/config/FilePostSyncAction.java
@@ -15,17 +15,12 @@
  * limitations under the License.
  */
 
-package org.apache.seatunnel.connectors.seatunnel.file.source.event;
+package org.apache.seatunnel.connectors.seatunnel.file.config;
 
-import org.apache.seatunnel.api.source.SourceEvent;
+import java.io.Serializable;
 
-import lombok.Getter;
-import lombok.RequiredArgsConstructor;
-
-@Getter
-@RequiredArgsConstructor
-public class FileSplitFinishedEvent implements SourceEvent {
-    private static final long serialVersionUID = 1L;
-
-    private final String splitId;
+public enum FilePostSyncAction implements Serializable {
+    NONE,
+    DELETE,
+    BACKUP
 }
diff --git a/seatunnel-connectors-v2/connector-file/connector-file-base/src/main/java/org/apache/seatunnel/connectors/seatunnel/file/hadoop/HadoopFileSystemProxy.java b/seatunnel-connectors-v2/connector-file/connector-file-base/src/main/java/org/apache/seatunnel/connectors/seatunnel/file/hadoop/HadoopFileSystemProxy.java
index 07997b62b6..bc84f43f52 100644
--- a/seatunnel-connectors-v2/connector-file/connector-file-base/src/main/java/org/apache/seatunnel/connectors/seatunnel/file/hadoop/HadoopFileSystemProxy.java
+++ b/seatunnel-connectors-v2/connector-file/connector-file-base/src/main/java/org/apache/seatunnel/connectors/seatunnel/file/hadoop/HadoopFileSystemProxy.java
@@ -66,6 +66,19 @@ public class HadoopFileSystemProxy implements Serializable, Closeable {
         return execute(() -> getFileSystem().exists(new Path(filePath)));
     }
 
+    /**
+     * Qualifies a path against this proxy's configured filesystem.
+     *
+     * <p>This preserves the filesystem scheme and authority for paths configured without a URI,
+     * such as a relative FTP backup path.
+     *
+     * @param filePath path to qualify
+     * @return path qualified with the configured filesystem URI
+     */
+    public String makeQualifiedPath(@NonNull String filePath) {
+        return getFileSystem().makeQualified(new Path(filePath)).toString();
+    }
+
     public boolean isFile(@NonNull String filePath) throws IOException {
         return execute(() -> getFileSystem().getFileStatus(new Path(filePath)).isFile());
     }
@@ -129,13 +142,20 @@ public class HadoopFileSystemProxy implements Serializable, Closeable {
                     Path newPath = new Path(newFilePath);
 
                     if (!fileExist(oldPath.toString())) {
-                        log.warn(
-                                "rename file:[{}] to [{}] already finished in the last commit, skip. "
-                                        + "WARNING: In cluster mode with LocalFile without shared storage, "
-                                        + "the file may not be actually synced successfully, but the status shows success.",
-                                oldPath,
-                                newPath);
-                        return Void.class;
+                        if (fileExist(newPath.toString())) {
+                            log.info(
+                                    "Rename file from [{}] to [{}] already finished in a previous "
+                                            + "commit, skip.",
+                                    oldPath,
+                                    newPath);
+                            return Void.class;
+                        }
+                        throw new IOException(
+                                "Cannot rename file from ["
+                                        + oldPath
+                                        + "] to ["
+                                        + newPath
+                                        + "]: both source and target are missing.");
                     }
 
                     if (removeWhenNewFilePathExist) {
diff --git a/seatunnel-connectors-v2/connector-file/connector-file-base/src/main/java/org/apache/seatunnel/connectors/seatunnel/file/sink/BaseFileSinkWriter.java b/seatunnel-connectors-v2/connector-file/connector-file-base/src/main/java/org/apache/seatunnel/connectors/seatunnel/file/sink/BaseFileSinkWriter.java
index 7fc9f6b135..7a06868ea2 100644
--- a/seatunnel-connectors-v2/connector-file/connector-file-base/src/main/java/org/apache/seatunnel/connectors/seatunnel/file/sink/BaseFileSinkWriter.java
+++ b/seatunnel-connectors-v2/connector-file/connector-file-base/src/main/java/org/apache/seatunnel/connectors/seatunnel/file/sink/BaseFileSinkWriter.java
@@ -32,9 +32,7 @@ import org.apache.seatunnel.connectors.seatunnel.file.config.FileFormat;
 import org.apache.seatunnel.connectors.seatunnel.file.config.HadoopConf;
 import org.apache.seatunnel.connectors.seatunnel.file.exception.FileConnectorException;
 import org.apache.seatunnel.connectors.seatunnel.file.hadoop.HadoopFileSystemProxy;
-import org.apache.seatunnel.connectors.seatunnel.file.sink.commit.FileAggregatedCommitInfo;
 import org.apache.seatunnel.connectors.seatunnel.file.sink.commit.FileCommitInfo;
-import org.apache.seatunnel.connectors.seatunnel.file.sink.commit.FileSinkAggregatedCommitter;
 import org.apache.seatunnel.connectors.seatunnel.file.sink.state.FileSinkState;
 import org.apache.seatunnel.connectors.seatunnel.file.sink.writer.AbstractWriteStrategy;
 import org.apache.seatunnel.connectors.seatunnel.file.sink.writer.WriteStrategy;
@@ -43,9 +41,9 @@ import org.apache.hadoop.fs.Path;
 
 import java.io.IOException;
 import java.util.Collections;
-import java.util.LinkedHashMap;
 import java.util.List;
 import java.util.Optional;
+import java.util.Set;
 import java.util.UUID;
 import java.util.stream.Collectors;
 
@@ -80,28 +78,14 @@ public class BaseFileSinkWriter
             try {
                 List<String> transactions =
                         findTransactionList(jobId, uuidPrefix, hadoopFileSystemProxy);
-                FileSinkAggregatedCommitter fileSinkAggregatedCommitter =
-                        new FileSinkAggregatedCommitter(hadoopConf);
-                fileSinkAggregatedCommitter.init();
-                LinkedHashMap<String, FileSinkState> fileStatesMap = new LinkedHashMap<>();
-                fileSinkStates.forEach(
-                        fileSinkState ->
-                                fileStatesMap.put(fileSinkState.getTransactionId(), fileSinkState));
+                Set<String> restoredTransactionIds =
+                        fileSinkStates.stream()
+                                .map(FileSinkState::getTransactionId)
+                                .collect(Collectors.toSet());
                 for (String transaction : transactions) {
-                    if (fileStatesMap.containsKey(transaction)) {
-                        // need commit
-                        FileSinkState fileSinkState = fileStatesMap.get(transaction);
-                        FileAggregatedCommitInfo fileCommitInfo =
-                                fileSinkAggregatedCommitter.combine(
-                                        Collections.singletonList(
-                                                new FileCommitInfo(
-                                                        fileSinkState.getNeedMoveFiles(),
-                                                        fileSinkState.getPartitionDirAndValuesMap(),
-                                                        fileSinkState.getTransactionDir())));
-                        fileSinkAggregatedCommitter.commit(
-                                Collections.singletonList(fileCommitInfo));
-                    } else {
-                        // need abort
+                    if (!restoredTransactionIds.contains(transaction)) {
+                        // Checkpointed transactions are replayed exclusively by the aggregated
+                        // committer. Only transactions absent from restored state are abandoned.
                         writeStrategy.abortPrepare(transaction);
                     }
                 }
diff --git a/seatunnel-connectors-v2/connector-file/connector-file-base/src/main/java/org/apache/seatunnel/connectors/seatunnel/file/source/BaseFileSourceReader.java b/seatunnel-connectors-v2/connector-file/connector-file-base/src/main/java/org/apache/seatunnel/connectors/seatunnel/file/source/BaseFileSourceReader.java
index 4d71873d3e..3a15c1fcd7 100644
--- a/seatunnel-connectors-v2/connector-file/connector-file-base/src/main/java/org/apache/seatunnel/connectors/seatunnel/file/source/BaseFileSourceReader.java
+++ b/seatunnel-connectors-v2/connector-file/connector-file-base/src/main/java/org/apache/seatunnel/connectors/seatunnel/file/source/BaseFileSourceReader.java
@@ -74,7 +74,9 @@ public class BaseFileSourceReader implements SourceReader<SeaTunnelRow, FileSour
 
         if (split != null) {
             if (Boundedness.UNBOUNDED.equals(context.getBoundedness())) {
-                context.sendSourceEventToEnumerator(new FileSplitFinishedEvent(split.splitId()));
+                context.sendSourceEventToEnumerator(
+                        new FileSplitFinishedEvent(
+                                split.splitId(), readStrategy.getLastReadFingerprint()));
             }
             return;
         }
diff --git a/seatunnel-connectors-v2/connector-file/connector-file-base/src/main/java/org/apache/seatunnel/connectors/seatunnel/file/source/BaseMultipleTableFileSource.java b/seatunnel-connectors-v2/connector-file/connector-file-base/src/main/java/org/apache/seatunnel/connectors/seatunnel/file/source/BaseMultipleTableFileSource.java
index 759dd199b9..3350286d89 100644
--- a/seatunnel-connectors-v2/connector-file/connector-file-base/src/main/java/org/apache/seatunnel/connectors/seatunnel/file/source/BaseMultipleTableFileSource.java
+++ b/seatunnel-connectors-v2/connector-file/connector-file-base/src/main/java/org/apache/seatunnel/connectors/seatunnel/file/source/BaseMultipleTableFileSource.java
@@ -30,6 +30,7 @@ import org.apache.seatunnel.connectors.seatunnel.file.config.BaseFileSourceConfi
 import org.apache.seatunnel.connectors.seatunnel.file.config.BaseMultipleTableFileSourceConfig;
 import org.apache.seatunnel.connectors.seatunnel.file.config.FileBaseSourceOptions;
 import org.apache.seatunnel.connectors.seatunnel.file.config.FileDiscoveryMode;
+import org.apache.seatunnel.connectors.seatunnel.file.config.FilePostSyncAction;
 import org.apache.seatunnel.connectors.seatunnel.file.exception.FileConnectorException;
 import org.apache.seatunnel.connectors.seatunnel.file.source.reader.MultipleTableFileSourceReader;
 import org.apache.seatunnel.connectors.seatunnel.file.source.split.ContinuousMultipleTableFileSourceSplitEnumerator;
@@ -153,6 +154,20 @@ public abstract class BaseMultipleTableFileSource
                                 + "' must be consistent across tables.");
             }
         }
+        if (mode != FileDiscoveryMode.CONTINUOUS) {
+            for (BaseFileSourceConfig config : configs) {
+                FilePostSyncAction action =
+                        config.getBaseFileSourceConfig()
+                                .get(FileBaseSourceOptions.POST_SYNC_ACTION);
+                if (action == FilePostSyncAction.NONE) {
+                    continue;
+                }
+                throw new FileConnectorException(
+                        SeaTunnelAPIErrorCode.CONFIG_VALIDATION_FAILED,
+                        "post_sync_action only supports discovery_mode=continuous. "
+                                + "Please set post_sync_action=none or switch discovery_mode to continuous.");
+            }
+        }
         return mode;
     }
 }
diff --git a/seatunnel-connectors-v2/connector-file/connector-file-base/src/main/java/org/apache/seatunnel/connectors/seatunnel/file/source/event/FileSplitFinishedEvent.java b/seatunnel-connectors-v2/connector-file/connector-file-base/src/main/java/org/apache/seatunnel/connectors/seatunnel/file/source/event/FileSplitFinishedEvent.java
index f0eeeca681..08087b9d6a 100644
--- a/seatunnel-connectors-v2/connector-file/connector-file-base/src/main/java/org/apache/seatunnel/connectors/seatunnel/file/source/event/FileSplitFinishedEvent.java
+++ b/seatunnel-connectors-v2/connector-file/connector-file-base/src/main/java/org/apache/seatunnel/connectors/seatunnel/file/source/event/FileSplitFinishedEvent.java
@@ -20,12 +20,20 @@ package org.apache.seatunnel.connectors.seatunnel.file.source.event;
 import org.apache.seatunnel.api.source.SourceEvent;
 
 import lombok.Getter;
-import lombok.RequiredArgsConstructor;
 
 @Getter
-@RequiredArgsConstructor
 public class FileSplitFinishedEvent implements SourceEvent {
     private static final long serialVersionUID = 1L;
 
     private final String splitId;
+    private final String contentFingerprint;
+
+    public FileSplitFinishedEvent(String splitId) {
+        this(splitId, null);
+    }
+
+    public FileSplitFinishedEvent(String splitId, String contentFingerprint) {
+        this.splitId = splitId;
+        this.contentFingerprint = contentFingerprint;
+    }
 }
diff --git a/seatunnel-connectors-v2/connector-file/connector-file-base/src/main/java/org/apache/seatunnel/connectors/seatunnel/file/source/reader/BinaryReadStrategy.java b/seatunnel-connectors-v2/connector-file/connector-file-base/src/main/java/org/apache/seatunnel/connectors/seatunnel/file/source/reader/BinaryReadStrategy.java
index a5867d562d..4f1cfaac58 100644
--- a/seatunnel-connectors-v2/connector-file/connector-file-base/src/main/java/org/apache/seatunnel/connectors/seatunnel/file/source/reader/BinaryReadStrategy.java
+++ b/seatunnel-connectors-v2/connector-file/connector-file-base/src/main/java/org/apache/seatunnel/connectors/seatunnel/file/source/reader/BinaryReadStrategy.java
@@ -32,8 +32,11 @@ import org.apache.seatunnel.connectors.seatunnel.file.exception.FileConnectorExc
 import org.apache.commons.io.IOUtils;
 import org.apache.hadoop.fs.Path;
 
+import java.io.FilterInputStream;
 import java.io.IOException;
 import java.io.InputStream;
+import java.security.MessageDigest;
+import java.security.NoSuchAlgorithmException;
 import java.util.Arrays;
 
 /** Used to read file to binary stream */
@@ -51,6 +54,7 @@ public class BinaryReadStrategy extends AbstractReadStrategy {
     private int binaryChunkSize = FileBaseSourceOptions.BINARY_CHUNK_SIZE.defaultValue();
     private boolean completeFileMode =
             FileBaseSourceOptions.BINARY_COMPLETE_FILE_MODE.defaultValue();
+    private transient String lastReadFingerprint;
 
     @Override
     public void init(HadoopConf conf) {
@@ -90,7 +94,10 @@ public class BinaryReadStrategy extends AbstractReadStrategy {
     @Override
     public void read(String path, String tableId, Collector<SeaTunnelRow> output)
             throws IOException, FileConnectorException {
-        try (InputStream inputStream = hadoopFileSystemProxy.getInputStream(path)) {
+        MessageDigest digest = createSha256Digest();
+        lastReadFingerprint = null;
+        try (InputStream inputStream =
+                new DigestTrackingInputStream(hadoopFileSystemProxy.getInputStream(path), digest)) {
             String relativePath = resolveBinaryRelativePath(path);
 
             if (completeFileMode) {
@@ -106,9 +113,15 @@ public class BinaryReadStrategy extends AbstractReadStrategy {
             endRow.setTableId(tableId);
             MetadataUtil.setBinaryRowComplete(endRow);
             output.collect(endRow);
+            lastReadFingerprint = sha256Hex(digest.digest());
         }
     }
 
+    @Override
+    public String getLastReadFingerprint() {
+        return lastReadFingerprint;
+    }
+
     private String resolveBinaryRelativePath(String filePath) {
         if (basePathIsFile) {
             return new Path(filePath).getName();
@@ -167,4 +180,50 @@ public class BinaryReadStrategy extends AbstractReadStrategy {
     public SeaTunnelRowType getSeaTunnelRowTypeInfo(String path) throws FileConnectorException {
         return binaryRowType;
     }
+
+    private static MessageDigest createSha256Digest() throws IOException {
+        try {
+            return MessageDigest.getInstance("SHA-256");
+        } catch (NoSuchAlgorithmException e) {
+            throw new IOException("SHA-256 is not supported by this JVM", e);
+        }
+    }
+
+    private static String sha256Hex(byte[] bytes) {
+        char[] digits = "0123456789abcdef".toCharArray();
+        char[] encoded = new char[bytes.length * 2];
+        for (int i = 0; i < bytes.length; i++) {
+            int current = bytes[i] & 0xff;
+            encoded[i * 2] = digits[current >>> 4];
+            encoded[i * 2 + 1] = digits[current & 0x0f];
+        }
+        return new String(encoded);
+    }
+
+    private static final class DigestTrackingInputStream extends FilterInputStream {
+        private final MessageDigest digest;
+
+        private DigestTrackingInputStream(InputStream in, MessageDigest digest) {
+            super(in);
+            this.digest = digest;
+        }
+
+        @Override
+        public int read() throws IOException {
+            int result = super.read();
+            if (result >= 0) {
+                digest.update((byte) result);
+            }
+            return result;
+        }
+
+        @Override
+        public int read(byte[] b, int off, int len) throws IOException {
+            int read = super.read(b, off, len);
+            if (read > 0) {
+                digest.update(b, off, read);
+            }
+            return read;
+        }
+    }
 }
diff --git a/seatunnel-connectors-v2/connector-file/connector-file-base/src/main/java/org/apache/seatunnel/connectors/seatunnel/file/source/reader/MultipleTableFileSourceReader.java b/seatunnel-connectors-v2/connector-file/connector-file-base/src/main/java/org/apache/seatunnel/connectors/seatunnel/file/source/reader/MultipleTableFileSourceReader.java
index 197bdc54d5..302898c94a 100644
--- a/seatunnel-connectors-v2/connector-file/connector-file-base/src/main/java/org/apache/seatunnel/connectors/seatunnel/file/source/reader/MultipleTableFileSourceReader.java
+++ b/seatunnel-connectors-v2/connector-file/connector-file-base/src/main/java/org/apache/seatunnel/connectors/seatunnel/file/source/reader/MultipleTableFileSourceReader.java
@@ -95,7 +95,13 @@ public class MultipleTableFileSourceReader implements SourceReader<SeaTunnelRow,
 
         if (split != null) {
             if (Boundedness.UNBOUNDED.equals(context.getBoundedness())) {
-                SourceEvent event = new FileSplitFinishedEvent(split.splitId());
+                ReadStrategy readStrategy = readStrategyMap.get(split.getTableId());
+                SourceEvent event =
+                        new FileSplitFinishedEvent(
+                                split.splitId(),
+                                readStrategy == null
+                                        ? null
+                                        : readStrategy.getLastReadFingerprint());
                 context.sendSourceEventToEnumerator(event);
             }
             return;
diff --git a/seatunnel-connectors-v2/connector-file/connector-file-base/src/main/java/org/apache/seatunnel/connectors/seatunnel/file/source/reader/ReadStrategy.java b/seatunnel-connectors-v2/connector-file/connector-file-base/src/main/java/org/apache/seatunnel/connectors/seatunnel/file/source/reader/ReadStrategy.java
index ed3a6152dd..16786561e6 100644
--- a/seatunnel-connectors-v2/connector-file/connector-file-base/src/main/java/org/apache/seatunnel/connectors/seatunnel/file/source/reader/ReadStrategy.java
+++ b/seatunnel-connectors-v2/connector-file/connector-file-base/src/main/java/org/apache/seatunnel/connectors/seatunnel/file/source/reader/ReadStrategy.java
@@ -51,6 +51,10 @@ public interface ReadStrategy extends Serializable, Closeable {
         read(split.getFilePath(), split.getTableId(), output);
     }
 
+    default String getLastReadFingerprint() {
+        return null;
+    }
+
     SeaTunnelRowType getSeaTunnelRowTypeInfo(String path) throws FileConnectorException;
 
     default SeaTunnelRowType getSeaTunnelRowTypeInfo(TablePath tablePath, String path)
diff --git a/seatunnel-connectors-v2/connector-file/connector-file-base/src/main/java/org/apache/seatunnel/connectors/seatunnel/file/source/split/ContinuousMultipleTableFileSourceSplitEnumerator.java b/seatunnel-connectors-v2/connector-file/connector-file-base/src/main/java/org/apache/seatunnel/connectors/seatunnel/file/source/split/ContinuousMultipleTableFileSourceSplitEnumerator.java
index 34041efcbf..6c718d7302 100644
--- a/seatunnel-connectors-v2/connector-file/connector-file-base/src/main/java/org/apache/seatunnel/connectors/seatunnel/file/source/split/ContinuousMultipleTableFileSourceSplitEnumerator.java
+++ b/seatunnel-connectors-v2/connector-file/connector-file-base/src/main/java/org/apache/seatunnel/connectors/seatunnel/file/source/split/ContinuousMultipleTableFileSourceSplitEnumerator.java
@@ -21,6 +21,8 @@ import org.apache.seatunnel.shade.com.google.common.annotations.VisibleForTestin
 import org.apache.seatunnel.shade.org.apache.commons.lang3.StringUtils;
 
 import org.apache.seatunnel.api.common.SeaTunnelAPIErrorCode;
+import org.apache.seatunnel.api.common.metrics.Counter;
+import org.apache.seatunnel.api.common.metrics.MetricsContext;
 import org.apache.seatunnel.api.configuration.ReadonlyConfig;
 import org.apache.seatunnel.api.source.SourceEvent;
 import org.apache.seatunnel.api.source.SourceSplitEnumerator;
@@ -30,6 +32,7 @@ import org.apache.seatunnel.connectors.seatunnel.file.config.FileBaseSourceOptio
 import org.apache.seatunnel.connectors.seatunnel.file.config.FileCompareMode;
 import org.apache.seatunnel.connectors.seatunnel.file.config.FileDiscoveryMode;
 import org.apache.seatunnel.connectors.seatunnel.file.config.FileFormat;
+import org.apache.seatunnel.connectors.seatunnel.file.config.FilePostSyncAction;
 import org.apache.seatunnel.connectors.seatunnel.file.config.FileStartMode;
 import org.apache.seatunnel.connectors.seatunnel.file.config.FileSyncMode;
 import org.apache.seatunnel.connectors.seatunnel.file.config.FileUpdateStrategy;
@@ -37,6 +40,7 @@ import org.apache.seatunnel.connectors.seatunnel.file.config.HadoopConf;
 import org.apache.seatunnel.connectors.seatunnel.file.exception.FileConnectorException;
 import org.apache.seatunnel.connectors.seatunnel.file.hadoop.HadoopFileSystemProxy;
 import org.apache.seatunnel.connectors.seatunnel.file.source.event.FileSplitFinishedEvent;
+import org.apache.seatunnel.connectors.seatunnel.file.source.state.FileSourceOperationState;
 import org.apache.seatunnel.connectors.seatunnel.file.source.state.FileSourceState;
 
 import org.apache.hadoop.fs.FileChecksum;
@@ -47,6 +51,9 @@ import lombok.extern.slf4j.Slf4j;
 
 import java.io.IOException;
 import java.io.InputStream;
+import java.nio.charset.StandardCharsets;
+import java.security.MessageDigest;
+import java.security.NoSuchAlgorithmException;
 import java.text.ParseException;
 import java.text.SimpleDateFormat;
 import java.time.Duration;
@@ -61,9 +68,11 @@ import java.util.LinkedHashMap;
 import java.util.List;
 import java.util.Locale;
 import java.util.Map;
+import java.util.NavigableMap;
 import java.util.Objects;
 import java.util.Optional;
 import java.util.Set;
+import java.util.TreeMap;
 import java.util.concurrent.Executors;
 import java.util.concurrent.ScheduledExecutorService;
 import java.util.concurrent.TimeUnit;
@@ -81,6 +90,15 @@ public class ContinuousMultipleTableFileSourceSplitEnumerator
         implements SourceSplitEnumerator<FileSourceSplit, FileSourceState> {
 
     private static final int DEFAULT_ASSIGN_BATCH_SIZE = 32;
+    private static final String METRIC_POST_SYNC_SUBMITTED = "post_sync_operations_submitted";
+    private static final String METRIC_POST_SYNC_SUCCEEDED = "post_sync_operations_succeeded";
+    private static final String METRIC_POST_SYNC_FAILED = "post_sync_operations_failed";
+    private static final String METRIC_POST_SYNC_STALE_SKIPPED =
+            "post_sync_operations_stale_skipped";
+    private static final String METRIC_RETENTION_DELETED = "retention_deleted_files";
+    private static final String METRIC_RETENTION_FAILED = "retention_failed_operations";
+    private static final Pattern BACKUP_VERSION_SUFFIX_PATTERN =
+            Pattern.compile("^.+\\.v(\\d+)_(\\d+)(?:_(\\d+))?$");
 
     private final Context<FileSourceSplit> context;
     private final List<TableScanContext> tableScanContexts;
@@ -91,12 +109,25 @@ public class ContinuousMultipleTableFileSourceSplitEnumerator
     private final Object lock = new Object();
     private final Deque<FileSourceSplit> pendingSplits = new ArrayDeque<>();
     private final Set<String> pendingSplitIds = new HashSet<>();
+    private final Map<String, SplitVersion> pendingSplitVersions = new HashMap<>();
     private final Set<Integer> readersAwaitingSplit = new HashSet<>();
     // Tracks the latest queued/completed source file version to prevent duplicate re-queue
     // before the target side catches up (e.g. short scan interval with distcp update mode).
     private final Map<String, SplitVersion> knownSplitVersions = new HashMap<>();
+    private final Map<String, InFlightSplitContext> inFlightSplitContexts = new HashMap<>();
+    private final List<FileSourceOperationState> finishedAwaitingCheckpoint = new ArrayList<>();
+    private final NavigableMap<Long, List<FileSourceOperationState>> pendingOpsByCheckpoint =
+            new TreeMap<>();
+    private final Map<String, Long> retentionLastRunMillisByPath = new HashMap<>();
     private Set<FileSourceSplit> inFlightSplits;
 
+    private final Counter postSyncSubmittedCounter;
+    private final Counter postSyncSucceededCounter;
+    private final Counter postSyncFailedCounter;
+    private final Counter postSyncStaleSkippedCounter;
+    private final Counter retentionDeletedCounter;
+    private final Counter retentionFailedCounter;
+
     private ScheduledExecutorService scheduler;
     private volatile boolean closed;
 
@@ -117,6 +148,20 @@ public class ContinuousMultipleTableFileSourceSplitEnumerator
             FileSplitStrategy fileSplitStrategy,
             FileSourceState checkpointState) {
         this.context = context;
+        MetricsContext metricsContext = null;
+        try {
+            metricsContext = context.getMetricsContext();
+        } catch (Exception e) {
+            log.warn("Unable to initialize metrics context for file source enumerator.", e);
+        }
+        this.postSyncSubmittedCounter = initCounter(metricsContext, METRIC_POST_SYNC_SUBMITTED);
+        this.postSyncSucceededCounter = initCounter(metricsContext, METRIC_POST_SYNC_SUCCEEDED);
+        this.postSyncFailedCounter = initCounter(metricsContext, METRIC_POST_SYNC_FAILED);
+        this.postSyncStaleSkippedCounter =
+                initCounter(metricsContext, METRIC_POST_SYNC_STALE_SKIPPED);
+        this.retentionDeletedCounter = initCounter(metricsContext, METRIC_RETENTION_DELETED);
+        this.retentionFailedCounter = initCounter(metricsContext, METRIC_RETENTION_FAILED);
+
         this.jobStartTimeMillis =
                 checkpointState.getDiscoveryStartTimeMillis() > 0
                         ? checkpointState.getDiscoveryStartTimeMillis()
@@ -139,6 +184,8 @@ public class ContinuousMultipleTableFileSourceSplitEnumerator
         }
 
         recoverSplitsFromCheckpoint(restoredInFlightSplits);
+        restorePendingOpsFromCheckpoint(checkpointState.getPendingOpsByCheckpoint());
+        restoreRetentionCursor(checkpointState.getRetentionLastRunMillisByPath());
     }
 
     @Override
@@ -194,7 +241,13 @@ public class ContinuousMultipleTableFileSourceSplitEnumerator
         synchronized (lock) {
             for (FileSourceSplit split : splits) {
                 inFlightSplits.remove(split);
-                enqueueSplitIfAbsent(split);
+                InFlightSplitContext inFlightSplitContext =
+                        inFlightSplitContexts.remove(split.splitId());
+                SplitVersion splitVersion =
+                        inFlightSplitContext == null
+                                ? knownSplitVersions.get(split.splitId())
+                                : inFlightSplitContext.splitVersion;
+                enqueueSplitIfAbsent(split, splitVersion);
             }
         }
         handleSplitRequest(subtaskId);
@@ -218,6 +271,9 @@ public class ContinuousMultipleTableFileSourceSplitEnumerator
                 }
                 pendingSplitIds.remove(split.splitId());
                 inFlightSplits.add(split);
+                SplitVersion splitVersion = pendingSplitVersions.remove(split.splitId());
+                inFlightSplitContexts.put(
+                        split.splitId(), new InFlightSplitContext(split, splitVersion));
                 assign.add(split);
             }
             if (assign.isEmpty()) {
@@ -243,14 +299,25 @@ public class ContinuousMultipleTableFileSourceSplitEnumerator
     @Override
     public FileSourceState snapshotState(long checkpointId) {
         synchronized (lock) {
+            if (!finishedAwaitingCheckpoint.isEmpty()) {
+                pendingOpsByCheckpoint
+                        .computeIfAbsent(checkpointId, key -> new ArrayList<>())
+                        .addAll(copyOperationStates(finishedAwaitingCheckpoint));
+                finishedAwaitingCheckpoint.clear();
+            }
             // Store in-flight splits only to avoid unbounded state growth.
-            return new FileSourceState(new HashSet<>(inFlightSplits), jobStartTimeMillis);
+            return new FileSourceState(
+                    new HashSet<>(inFlightSplits),
+                    jobStartTimeMillis,
+                    copyPendingOpsByCheckpoint(),
+                    new HashMap<>(retentionLastRunMillisByPath));
         }
     }
 
     @Override
     public void notifyCheckpointComplete(long checkpointId) {
-        // No-op.
+        commitPostSyncOperations(checkpointId);
+        runRetentionIfNeeded(checkpointId);
     }
 
     @Override
@@ -258,9 +325,69 @@ public class ContinuousMultipleTableFileSourceSplitEnumerator
         if (!(sourceEvent instanceof FileSplitFinishedEvent)) {
             return;
         }
-        String splitId = ((FileSplitFinishedEvent) sourceEvent).getSplitId();
+        FileSplitFinishedEvent fileSplitFinishedEvent = (FileSplitFinishedEvent) sourceEvent;
+        String splitId = fileSplitFinishedEvent.getSplitId();
+        InFlightSplitContext finishedContext;
         synchronized (lock) {
+            finishedContext = inFlightSplitContexts.get(splitId);
+        }
+        if (finishedContext == null) {
+            return;
+        }
+        Optional<TableScanContext> tableCtxOpt =
+                findTableScanContext(finishedContext.split.getTableId());
+        if (!tableCtxOpt.isPresent()) {
+            log.warn(
+                    "Skip post-sync staging because table context is not found. splitId={}, tableId={}",
+                    splitId,
+                    finishedContext.split.getTableId());
+            completeInFlightSplit(splitId, finishedContext, null);
+            return;
+        }
+        TableScanContext tableScanContext = tableCtxOpt.get();
+        if (tableScanContext.postSyncAction == FilePostSyncAction.NONE) {
+            completeInFlightSplit(splitId, finishedContext, null);
+            return;
+        }
+        FileSourceOperationState opState =
+                buildOperationStateFromFinishedSplit(
+                        tableScanContext,
+                        finishedContext,
+                        fileSplitFinishedEvent.getContentFingerprint());
+        if (opState == null) {
+            return;
+        }
+        if (!completeInFlightSplit(splitId, finishedContext, opState)) {
+            return;
+        }
+        incCounter(postSyncSubmittedCounter);
+        if (log.isDebugEnabled()) {
+            log.debug(
+                    "Staged post-sync operation: action={}, splitId={}, source={}",
+                    opState.getAction(),
+                    opState.getSplitId(),
+                    maskUriUserInfo(opState.getSourcePath()));
+        }
+    }
+
+    /**
+     * Removes a completed split and stages its post-sync operation in one critical section, so a
+     * concurrent checkpoint observes either the in-flight split or the fully built operation.
+     */
+    private boolean completeInFlightSplit(
+            String splitId,
+            InFlightSplitContext expectedContext,
+            FileSourceOperationState operationState) {
+        synchronized (lock) {
+            if (inFlightSplitContexts.get(splitId) != expectedContext) {
+                return false;
+            }
+            inFlightSplitContexts.remove(splitId);
             inFlightSplits.removeIf(s -> Objects.equals(s.splitId(), splitId));
+            if (operationState != null) {
+                finishedAwaitingCheckpoint.add(operationState);
+            }
+            return true;
         }
     }
 
@@ -368,6 +495,11 @@ public class ContinuousMultipleTableFileSourceSplitEnumerator
             }
             pendingSplits.addLast(split);
             pendingSplitIds.add(splitId);
+            if (splitVersion != null) {
+                pendingSplitVersions.put(splitId, splitVersion);
+            } else {
+                pendingSplitVersions.remove(splitId);
+            }
             if (splitVersion != null) {
                 knownSplitVersions.put(splitId, splitVersion);
             }
@@ -420,7 +552,9 @@ public class ContinuousMultipleTableFileSourceSplitEnumerator
             synchronized (lock) {
                 pendingSplits.addLast(split);
                 pendingSplitIds.add(split.splitId());
-                knownSplitVersions.put(split.splitId(), SplitVersion.fromFileStatus(sourceStatus));
+                SplitVersion splitVersion = SplitVersion.fromFileStatus(sourceStatus);
+                pendingSplitVersions.put(split.splitId(), splitVersion);
+                knownSplitVersions.put(split.splitId(), splitVersion);
             }
             recovered++;
         }
@@ -464,6 +598,783 @@ public class ContinuousMultipleTableFileSourceSplitEnumerator
         }
     }
 
+    private void restorePendingOpsFromCheckpoint(
+            Map<Long, List<FileSourceOperationState>> checkpointOpsByCheckpoint) {
+        if (checkpointOpsByCheckpoint == null || checkpointOpsByCheckpoint.isEmpty()) {
+            return;
+        }
+        synchronized (lock) {
+            for (Map.Entry<Long, List<FileSourceOperationState>> entry :
+                    checkpointOpsByCheckpoint.entrySet()) {
+                if (entry.getValue() == null || entry.getValue().isEmpty()) {
+                    continue;
+                }
+                List<FileSourceOperationState> restoredOperations =
+                        copyOperationStates(entry.getValue());
+                pendingOpsByCheckpoint.put(entry.getKey(), restoredOperations);
+                for (FileSourceOperationState operation : restoredOperations) {
+                    knownSplitVersions.put(
+                            operation.getSplitId(),
+                            new SplitVersion(
+                                    operation.getSourceLength(),
+                                    operation.getSourceModificationTime()));
+                }
+            }
+        }
+    }
+
+    private void restoreRetentionCursor(Map<String, Long> retentionCursorByPath) {
+        if (retentionCursorByPath == null || retentionCursorByPath.isEmpty()) {
+            return;
+        }
+        synchronized (lock) {
+            retentionLastRunMillisByPath.putAll(retentionCursorByPath);
+        }
+    }
+
+    private void commitPostSyncOperations(long checkpointId) {
+        Map<Long, List<FileSourceOperationState>> toCommit = new TreeMap<>();
+        synchronized (lock) {
+            for (Map.Entry<Long, List<FileSourceOperationState>> entry :
+                    pendingOpsByCheckpoint.headMap(checkpointId, true).entrySet()) {
+                toCommit.put(entry.getKey(), copyOperationStates(entry.getValue()));
+            }
+        }
+        if (toCommit.isEmpty()) {
+            return;
+        }
+
+        long attempted = 0L;
+        long succeeded = 0L;
+        long failed = 0L;
+        long staleSkipped = 0L;
+        Map<Long, List<FileSourceOperationState>> remainingByCheckpoint = new TreeMap<>();
+
+        for (Map.Entry<Long, List<FileSourceOperationState>> entry : toCommit.entrySet()) {
+            List<FileSourceOperationState> remaining = new ArrayList<>();
+            for (FileSourceOperationState op : entry.getValue()) {
+                attempted++;
+                OpCommitResult result = commitSingleOperation(op, entry.getKey());
+                if (result == OpCommitResult.SUCCESS) {
+                    succeeded++;
+                    incCounter(postSyncSucceededCounter);
+                } else if (result == OpCommitResult.STALE_SKIPPED) {
+                    staleSkipped++;
+                    incCounter(postSyncStaleSkippedCounter);
+                } else {
+                    failed++;
+                    incCounter(postSyncFailedCounter);
+                    op.increaseRetryCount();
+                    remaining.add(op);
+                }
+            }
+            if (!remaining.isEmpty()) {
+                remainingByCheckpoint.put(entry.getKey(), remaining);
+            }
+        }
+
+        synchronized (lock) {
+            for (Long cp : toCommit.keySet()) {
+                pendingOpsByCheckpoint.remove(cp);
+            }
+            for (Map.Entry<Long, List<FileSourceOperationState>> entry :
+                    remainingByCheckpoint.entrySet()) {
+                pendingOpsByCheckpoint.put(entry.getKey(), entry.getValue());
+            }
+        }
+
+        log.info(
+                "Post-sync commit finished for checkpoint {}: attempted={}, success={}, stale_skipped={}, failed={}, remaining_checkpoints={}",
+                checkpointId,
+                attempted,
+                succeeded,
+                staleSkipped,
+                failed,
+                remainingByCheckpoint.size());
+    }
+
+    private OpCommitResult commitSingleOperation(FileSourceOperationState op, long checkpointId) {
+        Optional<TableScanContext> tableContextOpt = findTableScanContext(op.getTableId());
+        if (!tableContextOpt.isPresent()) {
+            log.warn(
+                    "Post-sync operation failed: table context not found, tableId={}, splitId={}",
+                    op.getTableId(),
+                    op.getSplitId());
+            return OpCommitResult.FAILED_RETRYABLE;
+        }
+
+        try {
+            if (op.getAction() == FilePostSyncAction.DELETE) {
+                return commitDeleteOperation(tableContextOpt.get(), op, checkpointId);
+            }
+            if (op.getAction() == FilePostSyncAction.BACKUP) {
+                return commitBackupOperation(tableContextOpt.get(), op, checkpointId);
+            }
+            return OpCommitResult.SUCCESS;
+        } catch (Exception e) {
+            log.warn(
+                    "Post-sync operation failed and will be retried: action={}, splitId={}, source={}, retryCount={}",
+                    op.getAction(),
+                    op.getSplitId(),
+                    maskUriUserInfo(op.getSourcePath()),
+                    op.getRetryCount(),
+                    e);
+            return OpCommitResult.FAILED_RETRYABLE;
+        }
+    }
+
+    private OpCommitResult commitDeleteOperation(
+            TableScanContext ctx, FileSourceOperationState op, long checkpointId)
+            throws IOException {
+        String trashPath = buildDeleteStagingPath(op, checkpointId);
+        FileStatus trashedStatus = getFileStatusIfPresent(ctx.sourceFs, trashPath);
+        if (trashedStatus == null
+                && getFileStatusIfPresent(ctx.sourceFs, op.getSourcePath()) == null) {
+            log.info(
+                    "Post-sync delete dropped: source and staged file are absent, source={}, "
+                            + "trash={}, checkpointId={}",
+                    maskUriUserInfo(op.getSourcePath()),
+                    maskUriUserInfo(trashPath),
+                    checkpointId);
+            return OpCommitResult.SUCCESS;
+        }
+
+        if (trashedStatus == null) {
+            try {
+                ctx.sourceFs.renameFile(op.getSourcePath(), trashPath, false);
+            } catch (Exception e) {
+                log.warn(
+                        "Post-sync delete: rename-to-trash failed, will retry: source={}",
+                        maskUriUserInfo(op.getSourcePath()),
+                        e);
+                return OpCommitResult.FAILED_RETRYABLE;
+            }
+            trashedStatus = getFileStatusIfPresent(ctx.sourceFs, trashPath);
+        }
+
+        if (trashedStatus == null) {
+            // Another actor removed the staged file after rename. There is no source-side data
+            // left for this operation to protect.
+            log.info(
+                    "Post-sync delete completed externally after staging: source={}, trash={}, "
+                            + "checkpointId={}",
+                    maskUriUserInfo(op.getSourcePath()),
+                    maskUriUserInfo(trashPath),
+                    checkpointId);
+            return OpCommitResult.SUCCESS;
+        }
+
+        if (!isOperationContentMatched(ctx, op, trashPath, trashedStatus)) {
+            return handleStaleStagedOperation(
+                    ctx, op, checkpointId, trashPath, "delete", trashedStatus);
+        }
+
+        if (!isSinkTargetCommitted(ctx, op, checkpointId, trashPath)) {
+            return handleRetryableStagedOperation(
+                    ctx, op, checkpointId, trashPath, "delete", trashedStatus);
+        }
+
+        ctx.sourceFs.deleteFile(trashPath);
+        log.info(
+                "Post-sync delete completed: source={}, trash={}, checkpointId={}, capturedLen={}, "
+                        + "capturedMtime={}",
+                maskUriUserInfo(op.getSourcePath()),
+                maskUriUserInfo(trashPath),
+                checkpointId,
+                op.getSourceLength(),
+                op.getSourceModificationTime());
+        return OpCommitResult.SUCCESS;
+    }
+
+    static String buildDeleteStagingPath(FileSourceOperationState op, long checkpointId) {
+        Path sourcePath = new Path(op.getSourcePath());
+        // Split IDs can contain qualified URIs, so keep the staging file name path-safe.
+        String trashFileName = ".st_trash." + checkpointId + "." + sha256Hex(op.getSplitId());
+        Path parent = sourcePath.getParent();
+        return parent == null ? trashFileName : new Path(parent, trashFileName).toString();
+    }
+
+    private static String sha256Hex(String value) {
+        try {
+            return sha256Hex(
+                    MessageDigest.getInstance("SHA-256")
+                            .digest(value.getBytes(StandardCharsets.UTF_8)));
+        } catch (NoSuchAlgorithmException e) {
+            throw new IllegalStateException("SHA-256 is not supported by this JVM", e);
+        }
+    }
+
+    private static String sha256Hex(byte[] bytes) {
+        char[] digits = "0123456789abcdef".toCharArray();
+        char[] encoded = new char[bytes.length * 2];
+        for (int i = 0; i < bytes.length; i++) {
+            int current = bytes[i] & 0xff;
+            encoded[i * 2] = digits[current >>> 4];
+            encoded[i * 2 + 1] = digits[current & 0x0f];
+        }
+        return new String(encoded);
+    }
+
+    private OpCommitResult commitBackupOperation(
+            TableScanContext ctx, FileSourceOperationState op, long checkpointId)
+            throws IOException {
+        if (StringUtils.isBlank(op.getBackupTargetPath())) {
+            log.warn(
+                    "Post-sync backup failed: backup target path is empty, splitId={}, source={}",
+                    op.getSplitId(),
+                    maskUriUserInfo(op.getSourcePath()));
+            return OpCommitResult.FAILED_RETRYABLE;
+        }
+
+        String stagingPath = buildBackupStagingPath(op);
+        FileStatus sourceStatus = getFileStatusIfPresent(ctx.sourceFs, op.getSourcePath());
+        FileStatus targetStatus = getFileStatusIfPresent(ctx.sourceFs, op.getBackupTargetPath());
+        FileStatus stagingStatus = getFileStatusIfPresent(ctx.sourceFs, stagingPath);
+
+        if (sourceStatus == null) {
+            if (targetStatus != null) {
+                if (isOperationContentMatched(ctx, op, op.getBackupTargetPath(), targetStatus)) {
+                    log.info(
+                            "Post-sync backup completed during a previous attempt: source={}, target={}, "
+                                    + "checkpointId={}, capturedLen={}, capturedMtime={}",
+                            maskUriUserInfo(op.getSourcePath()),
+                            maskUriUserInfo(op.getBackupTargetPath()),
+                            checkpointId,
+                            op.getSourceLength(),
+                            op.getSourceModificationTime());
+                    return OpCommitResult.SUCCESS;
+                }
+                log.error(
+                        "Post-sync backup recovery found an inconsistent target; operation will be "
+                                + "retried without deleting data: splitId={}, source={}, target={}, "
+                                + "capturedLen={}, capturedMtime={}, actualLen={}, actualMtime={}",
+                        op.getSplitId(),
+                        maskUriUserInfo(op.getSourcePath()),
+                        maskUriUserInfo(op.getBackupTargetPath()),
+                        op.getSourceLength(),
+                        op.getSourceModificationTime(),
+                        targetStatus.getLen(),
+                        targetStatus.getModificationTime());
+                return OpCommitResult.FAILED_RETRYABLE;
+            }
+            if (stagingStatus == null) {
+                log.warn(
+                        "Post-sync backup cannot determine completion because source, staging, and "
+                                + "backup target are absent; operation will be retried: splitId={}, "
+                                + "source={}, target={}, checkpointId={}",
+                        op.getSplitId(),
+                        maskUriUserInfo(op.getSourcePath()),
+                        maskUriUserInfo(op.getBackupTargetPath()),
+                        checkpointId);
+                return OpCommitResult.FAILED_RETRYABLE;
+            }
+        }
+
+        if (targetStatus != null && sourceStatus != null) {
+            // Never use an existing target as proof that this source can be deleted: it may belong
+            // to a previous attempt while a writer has recreated the source path.
+            log.warn(
+                    "Post-sync backup skipped because target already exists; source is retained: "
+                            + "splitId={}, source={}, target={}, checkpointId={}",
+                    op.getSplitId(),
+                    maskUriUserInfo(op.getSourcePath()),
+                    maskUriUserInfo(op.getBackupTargetPath()),
+                    checkpointId);
+            return OpCommitResult.STALE_SKIPPED;
+        }
+
+        if (sourceStatus != null
+                && stagingStatus == null
+                && !isSinkTargetCommitted(ctx, op, checkpointId, op.getSourcePath())) {
+            // Keep the source visible until the sink target reaches its final committed location.
+            // This avoids unnecessary source-side rename/restore churn on file systems such as FTP
+            // where a staged move can temporarily hide the discovery root before the sink commit is
+            // actually durable.
+            return OpCommitResult.FAILED_RETRYABLE;
+        }
+
+        if (stagingStatus == null) {
+            try {
+                ctx.sourceFs.renameFile(op.getSourcePath(), stagingPath, false);
+            } catch (Exception e) {
+                log.warn(
+                        "Post-sync backup: rename-to-staging failed, will retry: source={}, staging={}",
+                        maskUriUserInfo(op.getSourcePath()),
+                        maskUriUserInfo(stagingPath),
+                        e);
+                return OpCommitResult.FAILED_RETRYABLE;
+            }
+            stagingStatus = getFileStatusIfPresent(ctx.sourceFs, stagingPath);
+        }
+
+        if (stagingStatus == null) {
+            log.warn(
+                    "Post-sync backup staging disappeared before verification; operation will be retried: "
+                            + "splitId={}, source={}, staging={}, checkpointId={}",
+                    op.getSplitId(),
+                    maskUriUserInfo(op.getSourcePath()),
+                    maskUriUserInfo(stagingPath),
+                    checkpointId);
+            return OpCommitResult.FAILED_RETRYABLE;
+        }
+
+        if (!isOperationContentMatched(ctx, op, stagingPath, stagingStatus)) {
+            return handleStaleStagedOperation(
+                    ctx, op, checkpointId, stagingPath, "backup", stagingStatus);
+        }
+
+        if (!isSinkTargetCommitted(ctx, op, checkpointId, stagingPath)) {
+            return handleRetryableStagedOperation(
+                    ctx, op, checkpointId, stagingPath, "backup", stagingStatus);
+        }
+
+        ctx.sourceFs.renameFile(stagingPath, op.getBackupTargetPath(), false);
+        targetStatus = getFileStatusIfPresent(ctx.sourceFs, op.getBackupTargetPath());
+        if (targetStatus == null) {
+            log.warn(
+                    "Post-sync backup promotion target is absent after rename; operation will be retried: "
+                            + "splitId={}, source={}, target={}, checkpointId={}",
+                    op.getSplitId(),
+                    maskUriUserInfo(op.getSourcePath()),
+                    maskUriUserInfo(op.getBackupTargetPath()),
+                    checkpointId);
+            return OpCommitResult.FAILED_RETRYABLE;
+        }
+        if (!isOperationContentMatched(ctx, op, op.getBackupTargetPath(), targetStatus)) {
+            log.warn(
+                    "Post-sync backup promoted an unexpected target version; operation will be retried: "
+                            + "splitId={}, source={}, target={}, checkpointId={}",
+                    op.getSplitId(),
+                    maskUriUserInfo(op.getSourcePath()),
+                    maskUriUserInfo(op.getBackupTargetPath()),
+                    checkpointId);
+            return OpCommitResult.FAILED_RETRYABLE;
+        }
+
+        log.info(
+                "Post-sync backup completed: source={}, target={}, checkpointId={}, "
+                        + "capturedLen={}, capturedMtime={}",
+                maskUriUserInfo(op.getSourcePath()),
+                maskUriUserInfo(op.getBackupTargetPath()),
+                checkpointId,
+                op.getSourceLength(),
+                op.getSourceModificationTime());
+        return OpCommitResult.SUCCESS;
+    }
+
+    /**
+     * Verify the final sink object before mutating its source counterpart.
+     *
+     * <p>Source and sink checkpoint completion callbacks are independent. A source enumerator can
+     * therefore observe the completed checkpoint before the sink committer has renamed its
+     * temporary file. Checking both length and the checkpoint-captured content prevents post-sync
+     * delete or backup from racing ahead of that final sink commit, including when an older
+     * same-length target already exists.
+     */
+    private boolean isSinkTargetCommitted(
+            TableScanContext ctx,
+            FileSourceOperationState op,
+            long checkpointId,
+            String sourcePathToCompareWhenFingerprintMissing) {
+        String targetPath = ctx.targetFilePath(op.getSourcePath());
+        FileStatus targetStatus;
+        try {
+            targetStatus = getFileStatusIfPresent(ctx.targetFs, targetPath);
+            if (targetStatus == null || targetStatus.getLen() != op.getSourceLength()) {
+                log.info(
+                        "Post-sync operation is waiting for sink target: action={}, source={}, "
+                                + "target={}, checkpointId={}, expectedLen={}, actualLen={}",
+                        op.getAction(),
+                        maskUriUserInfo(op.getSourcePath()),
+                        maskUriUserInfo(targetPath),
+                        checkpointId,
+                        op.getSourceLength(),
+                        targetStatus == null ? null : targetStatus.getLen());
+                return false;
+            }
+            if (!isSinkTargetContentMatched(
+                    ctx, op, targetPath, sourcePathToCompareWhenFingerprintMissing)) {
+                log.info(
+                        "Post-sync operation is waiting for sink target content: action={}, "
+                                + "source={}, target={}, checkpointId={}",
+                        op.getAction(),
+                        maskUriUserInfo(op.getSourcePath()),
+                        maskUriUserInfo(targetPath),
+                        checkpointId);
+                return false;
+            }
+            return true;
+        } catch (Exception e) {
+            log.warn(
+                    "Post-sync operation cannot verify sink target and will be retried: action={}, "
+                            + "source={}, target={}, checkpointId={}",
+                    op.getAction(),
+                    maskUriUserInfo(op.getSourcePath()),
+                    maskUriUserInfo(targetPath),
+                    checkpointId,
+                    e);
+            return false;
+        }
+    }
+
+    private boolean isSinkTargetContentMatched(
+            TableScanContext ctx,
+            FileSourceOperationState op,
+            String targetPath,
+            String sourcePathToCompareWhenFingerprintMissing)
+            throws IOException {
+        if (StringUtils.isNotBlank(op.getSourceContentFingerprint())) {
+            return Objects.equals(
+                    op.getSourceContentFingerprint(),
+                    calculateContentFingerprint(ctx.targetFs, targetPath));
+        }
+        if (StringUtils.isBlank(sourcePathToCompareWhenFingerprintMissing)) {
+            return false;
+        }
+        return ctx.fileContentEquals(sourcePathToCompareWhenFingerprintMissing, targetPath);
+    }
+
+    private boolean isOperationContentMatched(
+            TableScanContext ctx,
+            FileSourceOperationState op,
+            String candidatePath,
+            FileStatus candidateStatus)
+            throws IOException {
+        if (candidateStatus == null) {
+            return false;
+        }
+        if (StringUtils.isNotBlank(op.getSourceContentFingerprint())) {
+            return Objects.equals(
+                    op.getSourceContentFingerprint(),
+                    calculateContentFingerprint(ctx.sourceFs, candidatePath));
+        }
+        return isVersionMatched(candidateStatus, op);
+    }
+
+    private FileStatus getFileStatusIfPresent(HadoopFileSystemProxy sourceFs, String path)
+            throws IOException {
+        try {
+            return sourceFs.getFileStatus(path);
+        } catch (java.io.FileNotFoundException e) {
+            return null;
+        }
+    }
+
+    private boolean isVersionMatched(FileStatus status, FileSourceOperationState op) {
+        return status.getLen() == op.getSourceLength()
+                && status.getModificationTime() == op.getSourceModificationTime();
+    }
+
+    private OpCommitResult handleStaleStagedOperation(
+            TableScanContext ctx,
+            FileSourceOperationState op,
+            long checkpointId,
+            String stagedPath,
+            String actionLabel,
+            FileStatus stagedStatus)
+            throws IOException {
+        RestoreStagedFileResult restoreResult =
+                restoreStagedSource(ctx, op, stagedPath, stagedStatus, actionLabel);
+        if (restoreResult == RestoreStagedFileResult.FAILED) {
+            log.error(
+                    "Post-sync {}: failed to restore staged file after stale-content detection; "
+                            + "operation will be retried: source={}, staging={}, checkpointId={}",
+                    actionLabel,
+                    maskUriUserInfo(op.getSourcePath()),
+                    maskUriUserInfo(stagedPath),
+                    checkpointId);
+            return OpCommitResult.FAILED_RETRYABLE;
+        }
+        log.warn(
+                "Post-sync {} skipped due to stale staged content: splitId={}, source={}, staging={}, "
+                        + "checkpointId={}",
+                actionLabel,
+                op.getSplitId(),
+                maskUriUserInfo(op.getSourcePath()),
+                maskUriUserInfo(stagedPath),
+                checkpointId);
+        return OpCommitResult.STALE_SKIPPED;
+    }
+
+    private OpCommitResult handleRetryableStagedOperation(
+            TableScanContext ctx,
+            FileSourceOperationState op,
+            long checkpointId,
+            String stagedPath,
+            String actionLabel,
+            FileStatus stagedStatus)
+            throws IOException {
+        RestoreStagedFileResult restoreResult =
+                restoreStagedSource(ctx, op, stagedPath, stagedStatus, actionLabel);
+        if (restoreResult == RestoreStagedFileResult.FAILED) {
+            log.warn(
+                    "Post-sync {} cannot restore staged source while waiting for sink target; "
+                            + "operation will be retried with staged file intact: source={}, staging={}, "
+                            + "checkpointId={}",
+                    actionLabel,
+                    maskUriUserInfo(op.getSourcePath()),
+                    maskUriUserInfo(stagedPath),
+                    checkpointId);
+        }
+        return OpCommitResult.FAILED_RETRYABLE;
+    }
+
+    private RestoreStagedFileResult restoreStagedSource(
+            TableScanContext ctx,
+            FileSourceOperationState op,
+            String stagedPath,
+            FileStatus stagedStatus,
+            String actionLabel)
+            throws IOException {
+        FileStatus currentSourceStatus = getFileStatusIfPresent(ctx.sourceFs, op.getSourcePath());
+        if (currentSourceStatus != null) {
+            if (ctx.fileContentEquals(stagedPath, op.getSourcePath())) {
+                ctx.sourceFs.deleteFile(stagedPath);
+                log.info(
+                        "Post-sync {} found identical source content already restored; deleted staged file: "
+                                + "source={}, staging={}",
+                        actionLabel,
+                        maskUriUserInfo(op.getSourcePath()),
+                        maskUriUserInfo(stagedPath));
+                return RestoreStagedFileResult.ALREADY_VISIBLE;
+            }
+            return RestoreStagedFileResult.FAILED;
+        }
+
+        try {
+            ctx.sourceFs.renameFile(stagedPath, op.getSourcePath(), false);
+            return RestoreStagedFileResult.RESTORED;
+        } catch (Exception restoreEx) {
+            log.debug(
+                    "Post-sync {} restore failed: source={}, staging={}",
+                    actionLabel,
+                    maskUriUserInfo(op.getSourcePath()),
+                    maskUriUserInfo(stagedPath),
+                    restoreEx);
+            return RestoreStagedFileResult.FAILED;
+        }
+    }
+
+    private static String buildBackupStagingPath(FileSourceOperationState op) {
+        return op.getBackupTargetPath() + ".staging";
+    }
+
+    private String calculateContentFingerprint(HadoopFileSystemProxy fs, String filePath)
+            throws IOException {
+        try (InputStream inputStream = fs.getInputStream(filePath)) {
+            MessageDigest digest = MessageDigest.getInstance("SHA-256");
+            byte[] buffer = new byte[8 * 1024];
+            int read;
+            while ((read = inputStream.read(buffer)) != -1) {
+                digest.update(buffer, 0, read);
+            }
+            return sha256Hex(digest.digest());
+        } catch (NoSuchAlgorithmException e) {
+            throw new IOException("SHA-256 is not supported by this JVM", e);
+        }
+    }
+
+    private void runRetentionIfNeeded(long checkpointId) {
+        long now = System.currentTimeMillis();
+        boolean hasAnyRetentionEnabled = false;
+        long deleted = 0L;
+        long failed = 0L;
+        for (TableScanContext ctx : tableScanContexts) {
+            if (!ctx.retentionEnabled()) {
+                continue;
+            }
+            hasAnyRetentionEnabled = true;
+            long lastRun;
+            synchronized (lock) {
+                lastRun = retentionLastRunMillisByPath.getOrDefault(ctx.backupPath, 0L);
+                if (now - lastRun < ctx.retentionCheckInterval.toMillis()) {
+                    continue;
+                }
+                retentionLastRunMillisByPath.put(ctx.backupPath, now);
+            }
+            RetentionResult result = runRetentionOnce(ctx, now);
+            deleted += result.deletedFiles;
+            failed += result.failedOperations;
+        }
+
+        if (hasAnyRetentionEnabled) {
+            log.info(
+                    "Retention scan finished at checkpoint {}: deleted_files={}, failed_operations={}.",
+                    checkpointId,
+                    deleted,
+                    failed);
+        }
+    }
+
+    private RetentionResult runRetentionOnce(TableScanContext ctx, long nowMillis) {
+        RetentionResult result = new RetentionResult();
+        long expireBefore = nowMillis - ctx.retentionMaxAge.toMillis();
+        try {
+            cleanupRetentionRecursively(ctx.sourceFs, ctx.backupPath, expireBefore, result);
+        } catch (Exception e) {
+            result.failedOperations++;
+            incCounter(retentionFailedCounter);
+            log.warn(
+                    "Retention scan failed: backupPath={}, maxAge={}, interval={}",
+                    maskUriUserInfo(ctx.backupPath),
+                    ctx.retentionMaxAge,
+                    ctx.retentionCheckInterval,
+                    e);
+        }
+        return result;
+    }
+
+    private void cleanupRetentionRecursively(
+            HadoopFileSystemProxy fs, String path, long expireBefore, RetentionResult result)
+            throws IOException {
+        FileStatus[] statuses;
+        try {
+            statuses = fs.listStatus(path);
+        } catch (java.io.FileNotFoundException e) {
+            return;
+        }
+        if (statuses == null || statuses.length == 0) {
+            return;
+        }
+        for (FileStatus status : statuses) {
+            if (status.isDirectory()) {
+                cleanupRetentionRecursively(fs, status.getPath().toString(), expireBefore, result);
+                continue;
+            }
+            if (!status.isFile()) {
+                continue;
+            }
+            if (!BACKUP_VERSION_SUFFIX_PATTERN.matcher(status.getPath().getName()).matches()) {
+                continue;
+            }
+            if (resolveBackupCreatedTimeMillis(status) > expireBefore) {
+                continue;
+            }
+            try {
+                fs.deleteFile(status.getPath().toString());
+                result.deletedFiles++;
+                incCounter(retentionDeletedCounter);
+            } catch (Exception e) {
+                result.failedOperations++;
+                incCounter(retentionFailedCounter);
+                log.warn(
+                        "Retention delete failed: file={}, expireBefore={}",
+                        maskUriUserInfo(status.getPath().toString()),
+                        expireBefore,
+                        e);
+            }
+        }
+    }
+
+    private long resolveBackupCreatedTimeMillis(FileStatus status) {
+        java.util.regex.Matcher matcher =
+                BACKUP_VERSION_SUFFIX_PATTERN.matcher(status.getPath().getName());
+        if (matcher.matches() && matcher.group(3) != null) {
+            try {
+                return Long.parseLong(matcher.group(3));
+            } catch (NumberFormatException ignored) {
+                // Fall through to filesystem mtime for malformed legacy file names.
+            }
+        }
+        return status.getModificationTime();
+    }
+
+    private FileSourceOperationState buildOperationStateFromFinishedSplit(
+            TableScanContext tableScanContext,
+            InFlightSplitContext inFlightSplitContext,
+            String sourceContentFingerprint) {
+        FileSourceSplit split = inFlightSplitContext.split;
+        SplitVersion splitVersion = inFlightSplitContext.splitVersion;
+        if (splitVersion == null) {
+            splitVersion = resolveSplitVersion(tableScanContext, split);
+        }
+        if (splitVersion == null) {
+            log.warn(
+                    "Skip post-sync staging because split version cannot be resolved: splitId={}, source={}",
+                    split.splitId(),
+                    maskUriUserInfo(split.getFilePath()));
+            return null;
+        }
+
+        String backupTargetPath = null;
+        if (tableScanContext.postSyncAction == FilePostSyncAction.BACKUP) {
+            String relativePath =
+                    resolveRelativePath(tableScanContext.rootPath, split.getFilePath());
+            long backupCreatedTimeMillis = System.currentTimeMillis();
+            String versionedRelativePath =
+                    relativePath
+                            + ".v"
+                            + splitVersion.length
+                            + "_"
+                            + splitVersion.modificationTime
+                            + "_"
+                            + backupCreatedTimeMillis;
+            backupTargetPath =
+                    buildTargetFilePath(tableScanContext.backupPath, versionedRelativePath);
+        }
+
+        return new FileSourceOperationState(
+                split.getTableId(),
+                split.splitId(),
+                split.getFilePath(),
+                splitVersion.length,
+                splitVersion.modificationTime,
+                tableScanContext.postSyncAction,
+                backupTargetPath,
+                sourceContentFingerprint);
+    }
+
+    private SplitVersion resolveSplitVersion(
+            TableScanContext tableScanContext, FileSourceSplit split) {
+        try {
+            FileStatus fileStatus = tableScanContext.sourceFs.getFileStatus(split.getFilePath());
+            return SplitVersion.fromFileStatus(fileStatus);
+        } catch (Exception e) {
+            if (log.isDebugEnabled()) {
+                log.debug(
+                        "Failed to resolve split version from file status, splitId={}, source={}",
+                        split.splitId(),
+                        maskUriUserInfo(split.getFilePath()),
+                        e);
+            }
+            return null;
+        }
+    }
+
+    private static List<FileSourceOperationState> copyOperationStates(
+            List<FileSourceOperationState> operationStates) {
+        if (operationStates == null || operationStates.isEmpty()) {
+            return new ArrayList<>();
+        }
+        return new ArrayList<>(operationStates);
+    }
+
+    private Map<Long, List<FileSourceOperationState>> copyPendingOpsByCheckpoint() {
+        Map<Long, List<FileSourceOperationState>> copied = new TreeMap<>();
+        for (Map.Entry<Long, List<FileSourceOperationState>> entry :
+                pendingOpsByCheckpoint.entrySet()) {
+            copied.put(entry.getKey(), copyOperationStates(entry.getValue()));
+        }
+        return copied;
+    }
+
+    private static Counter initCounter(MetricsContext metricsContext, String name) {
+        if (metricsContext == null) {
+            return null;
+        }
+        try {
+            return metricsContext.counter(name);
+        } catch (Exception e) {
+            return null;
+        }
+    }
+
+    private static void incCounter(Counter counter) {
+        if (counter != null) {
+            counter.inc();
+        }
+    }
+
     private static void validateContinuousDiscoveryConfig(List<BaseFileSourceConfig> configs) {
         FileDiscoveryMode mode = resolveGlobalOption(configs, FileBaseSourceOptions.DISCOVERY_MODE);
         if (mode != FileDiscoveryMode.CONTINUOUS) {
@@ -493,9 +1404,245 @@ public class ContinuousMultipleTableFileSourceSplitEnumerator
                                 + interval
                                 + ".");
             }
+            validatePostSyncConfig(cfg);
         }
     }
 
+    private static void validatePostSyncConfig(BaseFileSourceConfig baseFileSourceConfig) {
+        ReadonlyConfig config = baseFileSourceConfig.getBaseFileSourceConfig();
+        FilePostSyncAction action = config.get(FileBaseSourceOptions.POST_SYNC_ACTION);
+        if (action == FilePostSyncAction.NONE) {
+            return;
+        }
+        Optional<String> backupPath = config.getOptional(FileBaseSourceOptions.BACKUP_PATH);
+        Optional<Duration> retentionMaxAge =
+                config.getOptional(FileBaseSourceOptions.RETENTION_MAX_AGE);
+        Duration retentionCheckInterval =
+                config.get(FileBaseSourceOptions.RETENTION_CHECK_INTERVAL);
+
+        if (action != FilePostSyncAction.NONE) {
+            validatePostSyncPathSafety(
+                    config.get(FileBaseSourceOptions.FILE_PATH),
+                    baseFileSourceConfig.getHadoopConfig());
+        }
+        if (action == FilePostSyncAction.BACKUP && StringUtils.isBlank(backupPath.orElse(null))) {
+            throw new FileConnectorException(
+                    SeaTunnelAPIErrorCode.CONFIG_VALIDATION_FAILED,
+                    "post_sync_action=backup requires backup_path.");
+        }
+        if (action == FilePostSyncAction.BACKUP) {
+            validateBackupPath(baseFileSourceConfig, backupPath.get());
+        }
+
+        if (action != FilePostSyncAction.BACKUP && backupPath.isPresent()) {
+            throw new FileConnectorException(
+                    SeaTunnelAPIErrorCode.CONFIG_VALIDATION_FAILED,
+                    "backup_path is only valid when post_sync_action=backup.");
+        }
+
+        if (retentionMaxAge.isPresent()) {
+            if (action != FilePostSyncAction.BACKUP) {
+                throw new FileConnectorException(
+                        SeaTunnelAPIErrorCode.CONFIG_VALIDATION_FAILED,
+                        "retention_max_age is only valid when post_sync_action=backup.");
+            }
+            if (retentionMaxAge.get().isZero() || retentionMaxAge.get().isNegative()) {
+                throw new FileConnectorException(
+                        SeaTunnelAPIErrorCode.CONFIG_VALIDATION_FAILED,
+                        "retention_max_age must be greater than 0, but got "
+                                + retentionMaxAge.get()
+                                + ".");
+            }
+            if (retentionCheckInterval.isZero() || retentionCheckInterval.isNegative()) {
+                throw new FileConnectorException(
+                        SeaTunnelAPIErrorCode.CONFIG_VALIDATION_FAILED,
+                        "retention_check_interval must be greater than 0, but got "
+                                + retentionCheckInterval
+                                + ".");
+            }
+        }
+    }
+
+    private static void validateBackupPath(
+            BaseFileSourceConfig baseFileSourceConfig, String backupPath) {
+        ReadonlyConfig config = baseFileSourceConfig.getBaseFileSourceConfig();
+        String sourcePath = config.get(FileBaseSourceOptions.FILE_PATH);
+        HadoopConf hadoopConf = baseFileSourceConfig.getHadoopConfig();
+        String defaultFsIdentity =
+                normalizeFsIdentity(hadoopConf == null ? null : hadoopConf.getHdfsNameKey());
+        String sourceFsIdentity = resolveFsIdentity(sourcePath, defaultFsIdentity);
+        String backupFsIdentity = resolveFsIdentity(backupPath, defaultFsIdentity);
+        if (Objects.equals(sourceFsIdentity, backupFsIdentity)) {
+            try (HadoopFileSystemProxy fs = new HadoopFileSystemProxy(hadoopConf)) {
+                String qualifiedSource = fs.makeQualifiedPath(sourcePath);
+                String qualifiedBackup = fs.makeQualifiedPath(backupPath);
+                if (isPathOverlappedQualified(qualifiedSource, qualifiedBackup)) {
+                    throw new FileConnectorException(
+                            SeaTunnelAPIErrorCode.CONFIG_VALIDATION_FAILED,
+                            "backup_path must not overlap with path. Please configure backup_path outside the scanned path tree.");
+                }
+                return;
+            } catch (FileConnectorException e) {
+                throw e;
+            } catch (Exception e) {
+                throw new FileConnectorException(
+                        SeaTunnelAPIErrorCode.CONFIG_VALIDATION_FAILED,
+                        "Cannot validate backup_path against path using canonical filesystem paths. "
+                                + "Refusing to enable post_sync_action=backup until the path relationship "
+                                + "can be verified.",
+                        e);
+            }
+        }
+        throw new FileConnectorException(
+                SeaTunnelAPIErrorCode.CONFIG_VALIDATION_FAILED,
+                "post_sync_action=backup currently only supports same-filesystem backup in phase-1. "
+                        + "Please configure backup_path with the same scheme and authority as path.");
+    }
+
+    /**
+     * Compares two fully-qualified path URIs for overlap. Local filesystem paths are resolved with
+     * {@link java.nio.file.Path#toRealPath(java.nio.file.LinkOption...)} so symlink aliases cannot
+     * bypass the backup/source tree boundary.
+     */
+    private static boolean isPathOverlappedQualified(String qualifiedSource, String qualifiedBackup)
+            throws IOException {
+        Path sourcePath = new Path(qualifiedSource);
+        Path backupPath = new Path(qualifiedBackup);
+
+        String sourceScheme = sourcePath.toUri().getScheme();
+        String sourcePathStr;
+        String backupPathStr;
+        if (sourceScheme != null && "file".equalsIgnoreCase(sourceScheme)) {
+            sourcePathStr = resolveLocalPathForOverlap(sourcePath);
+            backupPathStr = resolveLocalPathForOverlap(backupPath);
+        } else {
+            sourcePathStr = trimTrailingPathSeparator(sourcePath.toUri().getPath());
+            backupPathStr = trimTrailingPathSeparator(backupPath.toUri().getPath());
+        }
+
+        if (StringUtils.isBlank(sourcePathStr) || StringUtils.isBlank(backupPathStr)) {
+            return false;
+        }
+        return Objects.equals(sourcePathStr, backupPathStr)
+                || isParentPathQualified(sourcePathStr, backupPathStr)
+                || isParentPathQualified(backupPathStr, sourcePathStr);
+    }
+
+    /**
+     * Resolves the existing prefix through real paths, then appends non-existing descendants. This
+     * supports a new backup directory while still detecting symlink aliases in its parent path.
+     */
+    private static String resolveLocalPathForOverlap(Path path) throws IOException {
+        java.nio.file.Path requestedPath =
+                java.nio.file.Paths.get(path.toUri()).toAbsolutePath().normalize();
+        Deque<java.nio.file.Path> missingSegments = new ArrayDeque<>();
+        java.nio.file.Path existingAncestor = requestedPath;
+        while (!java.nio.file.Files.exists(existingAncestor)) {
+            java.nio.file.Path fileName = existingAncestor.getFileName();
+            if (fileName == null || existingAncestor.getParent() == null) {
+                throw new IOException(
+                        "No existing ancestor found while resolving local path " + requestedPath);
+            }
+            missingSegments.push(fileName);
+            existingAncestor = existingAncestor.getParent();
+        }
+
+        java.nio.file.Path resolvedPath = existingAncestor.toRealPath();
+        while (!missingSegments.isEmpty()) {
+            resolvedPath = resolvedPath.resolve(missingSegments.pop());
+        }
+        return trimTrailingPathSeparator(resolvedPath.normalize().toString());
+    }
+
+    private static boolean isParentPathQualified(String parentPath, String childPath) {
+        return childPath.startsWith(parentPath + "/");
+    }
+
+    /**
+     * Rejects post_sync_action=delete|backup when the normalized path resolves to the filesystem
+     * root, to prevent mass deletion of source data.
+     */
+    private static void validatePostSyncPathSafety(String path, HadoopConf hadoopConf) {
+        if (StringUtils.isBlank(path)) {
+            throw new FileConnectorException(
+                    SeaTunnelAPIErrorCode.CONFIG_VALIDATION_FAILED,
+                    "post_sync_action=delete|backup requires a non-empty path.");
+        }
+        try (HadoopFileSystemProxy fs = new HadoopFileSystemProxy(hadoopConf)) {
+            String qualified = fs.makeQualifiedPath(path);
+            String pathComponent = new Path(qualified).toUri().getPath();
+            if ("/".equals(pathComponent) || pathComponent.isEmpty()) {
+                throw new FileConnectorException(
+                        SeaTunnelAPIErrorCode.CONFIG_VALIDATION_FAILED,
+                        "post_sync_action=delete|backup requires path to be a non-root directory. "
+                                + "Refusing to operate on filesystem root to prevent mass deletion.");
+            }
+        } catch (FileConnectorException e) {
+            throw e;
+        } catch (Exception e) {
+            // Best-effort: if filesystem not initialized, check raw path
+            String pathPart = new Path(path).toUri().getPath();
+            if (pathPart == null || "/".equals(pathPart) || pathPart.isEmpty()) {
+                throw new FileConnectorException(
+                        SeaTunnelAPIErrorCode.CONFIG_VALIDATION_FAILED,
+                        "post_sync_action=delete|backup requires path to be a non-root directory. "
+                                + "Refusing to operate on filesystem root to prevent mass deletion.");
+            }
+            log.warn(
+                    "Cannot qualify path for safety check, using raw path validation: {}", path, e);
+        }
+    }
+
+    private static String resolveFsIdentity(String path, String defaultFsIdentity) {
+        if (StringUtils.isBlank(path)) {
+            return defaultFsIdentity;
+        }
+        try {
+            java.net.URI uri = new Path(path).toUri();
+            if (StringUtils.isBlank(uri.getScheme())) {
+                return defaultFsIdentity;
+            }
+            return normalizeFsIdentity(uri);
+        } catch (Exception e) {
+            return defaultFsIdentity;
+        }
+    }
+
+    private static String normalizeFsIdentity(String rawFs) {
+        if (StringUtils.isBlank(rawFs)) {
+            return "";
+        }
+        try {
+            return normalizeFsIdentity(new Path(rawFs).toUri());
+        } catch (Exception e) {
+            return rawFs.trim().toLowerCase(Locale.ROOT);
+        }
+    }
+
+    private static String normalizeFsIdentity(java.net.URI uri) {
+        if (uri == null || StringUtils.isBlank(uri.getScheme())) {
+            return "";
+        }
+        String authority = uri.getAuthority();
+        if (authority != null && uri.getUserInfo() != null) {
+            authority = authority.replace(uri.getUserInfo() + "@", "");
+        }
+        return uri.getScheme().toLowerCase(Locale.ROOT)
+                + "://"
+                + StringUtils.defaultString(authority).toLowerCase(Locale.ROOT);
+    }
+
+    private static String trimTrailingPathSeparator(String path) {
+        if (StringUtils.isBlank(path)) {
+            return path;
+        }
+        String normalized = path.replace('\\', '/');
+        while (normalized.length() > 1 && normalized.endsWith("/")) {
+            normalized = normalized.substring(0, normalized.length() - 1);
+        }
+        return normalized;
+    }
+
     private static <T> T resolveGlobalOption(
             List<BaseFileSourceConfig> configs,
             org.apache.seatunnel.api.configuration.Option<T> option) {
@@ -525,6 +1672,10 @@ public class ContinuousMultipleTableFileSourceSplitEnumerator
         private final boolean shareTargetFs;
         private final FileUpdateStrategy updateStrategy;
         private final FileCompareMode compareMode;
+        private final FilePostSyncAction postSyncAction;
+        private final String backupPath;
+        private final Duration retentionMaxAge;
+        private final Duration retentionCheckInterval;
         private boolean checksumUnavailableWarned;
         private final boolean recursiveFileScan;
 
@@ -569,6 +1720,22 @@ public class ContinuousMultipleTableFileSourceSplitEnumerator
 
             this.updateStrategy = config.get(FileBaseSourceOptions.UPDATE_STRATEGY);
             this.compareMode = config.get(FileBaseSourceOptions.COMPARE_MODE);
+            this.postSyncAction = config.get(FileBaseSourceOptions.POST_SYNC_ACTION);
+            if (postSyncAction == FilePostSyncAction.BACKUP) {
+                this.backupPath =
+                        config.getOptional(FileBaseSourceOptions.BACKUP_PATH)
+                                .map(sourceFs::makeQualifiedPath)
+                                .orElse(null);
+                this.retentionMaxAge =
+                        config.getOptional(FileBaseSourceOptions.RETENTION_MAX_AGE).orElse(null);
+                this.retentionCheckInterval =
+                        config.get(FileBaseSourceOptions.RETENTION_CHECK_INTERVAL);
+            } else {
+                this.backupPath = null;
+                this.retentionMaxAge = null;
+                this.retentionCheckInterval =
+                        FileBaseSourceOptions.RETENTION_CHECK_INTERVAL.defaultValue();
+            }
             this.recursiveFileScan = config.get(FileBaseSourceOptions.RECURSIVE_FILE_SCAN);
 
             String targetPath = config.get(FileBaseSourceOptions.TARGET_PATH);
@@ -586,6 +1753,13 @@ public class ContinuousMultipleTableFileSourceSplitEnumerator
             this.fileSplitStrategy = fileSplitStrategy;
         }
 
+        private boolean retentionEnabled() {
+            return postSyncAction == FilePostSyncAction.BACKUP
+                    && StringUtils.isNotBlank(backupPath)
+                    && retentionMaxAge != null
+                    && retentionMaxAge.toMillis() > 0;
+        }
+
         private List<FileSourceSplit> toSplits(FileStatus fileStatus) {
             return fileSplitStrategy.split(tableId, fileStatus.getPath().toString());
         }
@@ -651,9 +1825,7 @@ public class ContinuousMultipleTableFileSourceSplitEnumerator
 
         private boolean shouldSyncInUpdateMode(FileStatus sourceFileStatus) throws IOException {
             String sourceFilePath = sourceFileStatus.getPath().toString();
-            String relativePath = resolveRelativePath(rootPath, sourceFilePath);
-            String targetPath = config.get(FileBaseSourceOptions.TARGET_PATH);
-            String targetFilePath = buildTargetFilePath(targetPath, relativePath);
+            String targetFilePath = targetFilePath(sourceFilePath);
 
             FileStatus targetFileStatus;
             try {
@@ -760,6 +1932,12 @@ public class ContinuousMultipleTableFileSourceSplitEnumerator
             return true;
         }
 
+        private String targetFilePath(String sourceFilePath) {
+            String relativePath = resolveRelativePath(rootPath, sourceFilePath);
+            String targetPath = config.get(FileBaseSourceOptions.TARGET_PATH);
+            return buildTargetFilePath(targetPath, relativePath);
+        }
+
         private boolean fileContentEquals(String sourceFilePath, String targetFilePath)
                 throws IOException {
             try (InputStream sourceIn = sourceFs.getInputStream(sourceFilePath);
@@ -977,6 +2155,33 @@ public class ContinuousMultipleTableFileSourceSplitEnumerator
         }
     }
 
+    private enum OpCommitResult {
+        SUCCESS,
+        STALE_SKIPPED,
+        FAILED_RETRYABLE
+    }
+
+    private static final class RetentionResult {
+        private long deletedFiles;
+        private long failedOperations;
+    }
+
+    private enum RestoreStagedFileResult {
+        RESTORED,
+        ALREADY_VISIBLE,
+        FAILED
+    }
+
+    private static final class InFlightSplitContext {
+        private final FileSourceSplit split;
+        private final SplitVersion splitVersion;
+
+        private InFlightSplitContext(FileSourceSplit split, SplitVersion splitVersion) {
+            this.split = split;
+            this.splitVersion = splitVersion;
+        }
+    }
+
     private static final class SplitVersion {
         private final long length;
         private final long modificationTime;
diff --git a/seatunnel-connectors-v2/connector-file/connector-file-base/src/main/java/org/apache/seatunnel/connectors/seatunnel/file/source/state/FileSourceOperationState.java b/seatunnel-connectors-v2/connector-file/connector-file-base/src/main/java/org/apache/seatunnel/connectors/seatunnel/file/source/state/FileSourceOperationState.java
new file mode 100644
index 0000000000..cb25ed20b3
--- /dev/null
+++ b/seatunnel-connectors-v2/connector-file/connector-file-base/src/main/java/org/apache/seatunnel/connectors/seatunnel/file/source/state/FileSourceOperationState.java
@@ -0,0 +1,121 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *    http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.seatunnel.connectors.seatunnel.file.source.state;
+
+import org.apache.seatunnel.connectors.seatunnel.file.config.FilePostSyncAction;
+
+import lombok.Getter;
+
+import java.io.Serializable;
+import java.util.Objects;
+
+/**
+ * Serializable post-sync operation record persisted in source checkpoint state.
+ *
+ * <p>The record keeps source file version (len/mtime) so delete/backup can be guarded against stale
+ * operations after restore.
+ */
+@Getter
+public class FileSourceOperationState implements Serializable {
+    private static final long serialVersionUID = 1L;
+
+    private final String tableId;
+    private final String splitId;
+    private final String sourcePath;
+    private final long sourceLength;
+    private final long sourceModificationTime;
+    private final FilePostSyncAction action;
+    private final String backupTargetPath;
+    private final String sourceContentFingerprint;
+    private int retryCount;
+
+    public FileSourceOperationState(
+            String tableId,
+            String splitId,
+            String sourcePath,
+            long sourceLength,
+            long sourceModificationTime,
+            FilePostSyncAction action,
+            String backupTargetPath) {
+        this(
+                tableId,
+                splitId,
+                sourcePath,
+                sourceLength,
+                sourceModificationTime,
+                action,
+                backupTargetPath,
+                null);
+    }
+
+    public FileSourceOperationState(
+            String tableId,
+            String splitId,
+            String sourcePath,
+            long sourceLength,
+            long sourceModificationTime,
+            FilePostSyncAction action,
+            String backupTargetPath,
+            String sourceContentFingerprint) {
+        this.tableId = tableId;
+        this.splitId = splitId;
+        this.sourcePath = sourcePath;
+        this.sourceLength = sourceLength;
+        this.sourceModificationTime = sourceModificationTime;
+        this.action = action;
+        this.backupTargetPath = backupTargetPath;
+        this.sourceContentFingerprint = sourceContentFingerprint;
+        this.retryCount = 0;
+    }
+
+    public void increaseRetryCount() {
+        retryCount++;
+    }
+
+    @Override
+    public boolean equals(Object o) {
+        if (this == o) {
+            return true;
+        }
+        if (o == null || getClass() != o.getClass()) {
+            return false;
+        }
+        FileSourceOperationState that = (FileSourceOperationState) o;
+        return sourceLength == that.sourceLength
+                && sourceModificationTime == that.sourceModificationTime
+                && Objects.equals(tableId, that.tableId)
+                && Objects.equals(splitId, that.splitId)
+                && Objects.equals(sourcePath, that.sourcePath)
+                && action == that.action
+                && Objects.equals(backupTargetPath, that.backupTargetPath)
+                && Objects.equals(sourceContentFingerprint, that.sourceContentFingerprint);
+    }
+
+    @Override
+    public int hashCode() {
+        return Objects.hash(
+                tableId,
+                splitId,
+                sourcePath,
+                sourceLength,
+                sourceModificationTime,
+                action,
+                backupTargetPath,
+                sourceContentFingerprint);
+    }
+}
diff --git a/seatunnel-connectors-v2/connector-file/connector-file-base/src/main/java/org/apache/seatunnel/connectors/seatunnel/file/source/state/FileSourceState.java b/seatunnel-connectors-v2/connector-file/connector-file-base/src/main/java/org/apache/seatunnel/connectors/seatunnel/file/source/state/FileSourceState.java
index 29a608c02e..145a13b39e 100644
--- a/seatunnel-connectors-v2/connector-file/connector-file-base/src/main/java/org/apache/seatunnel/connectors/seatunnel/file/source/state/FileSourceState.java
+++ b/seatunnel-connectors-v2/connector-file/connector-file-base/src/main/java/org/apache/seatunnel/connectors/seatunnel/file/source/state/FileSourceState.java
@@ -19,21 +19,44 @@ package org.apache.seatunnel.connectors.seatunnel.file.source.state;
 
 import org.apache.seatunnel.connectors.seatunnel.file.source.split.FileSourceSplit;
 
+import java.io.IOException;
+import java.io.ObjectInputStream;
 import java.io.Serializable;
+import java.util.Collections;
+import java.util.HashMap;
+import java.util.HashSet;
+import java.util.List;
+import java.util.Map;
 import java.util.Set;
 
 public class FileSourceState implements Serializable {
     private static final long serialVersionUID = 9208369906513934611L;
-    private final Set<FileSourceSplit> assignedSplit;
-    private final long discoveryStartTimeMillis;
+    private Set<FileSourceSplit> assignedSplit;
+    private long discoveryStartTimeMillis;
+    private Map<Long, List<FileSourceOperationState>> pendingOpsByCheckpoint;
+    private Map<String, Long> retentionLastRunMillisByPath;
 
     public FileSourceState(Set<FileSourceSplit> assignedSplit) {
-        this(assignedSplit, 0L);
+        this(assignedSplit, 0L, Collections.emptyMap(), Collections.emptyMap());
     }
 
     public FileSourceState(Set<FileSourceSplit> assignedSplit, long discoveryStartTimeMillis) {
+        this(
+                assignedSplit,
+                discoveryStartTimeMillis,
+                Collections.emptyMap(),
+                Collections.emptyMap());
+    }
+
+    public FileSourceState(
+            Set<FileSourceSplit> assignedSplit,
+            long discoveryStartTimeMillis,
+            Map<Long, List<FileSourceOperationState>> pendingOpsByCheckpoint,
+            Map<String, Long> retentionLastRunMillisByPath) {
         this.assignedSplit = assignedSplit;
         this.discoveryStartTimeMillis = discoveryStartTimeMillis;
+        this.pendingOpsByCheckpoint = pendingOpsByCheckpoint;
+        this.retentionLastRunMillisByPath = retentionLastRunMillisByPath;
     }
 
     public Set<FileSourceSplit> getAssignedSplit() {
@@ -43,4 +66,25 @@ public class FileSourceState implements Serializable {
     public long getDiscoveryStartTimeMillis() {
         return discoveryStartTimeMillis;
     }
+
+    public Map<Long, List<FileSourceOperationState>> getPendingOpsByCheckpoint() {
+        return pendingOpsByCheckpoint;
+    }
+
+    public Map<String, Long> getRetentionLastRunMillisByPath() {
+        return retentionLastRunMillisByPath;
+    }
+
+    private void readObject(ObjectInputStream in) throws IOException, ClassNotFoundException {
+        in.defaultReadObject();
+        if (assignedSplit == null) {
+            assignedSplit = new HashSet<>();
+        }
+        if (pendingOpsByCheckpoint == null) {
+            pendingOpsByCheckpoint = new HashMap<>();
+        }
+        if (retentionLastRunMillisByPath == null) {
+            retentionLastRunMillisByPath = new HashMap<>();
+        }
+    }
 }
diff --git a/seatunnel-connectors-v2/connector-file/connector-file-base/src/test/java/org/apache/seatunnel/connectors/seatunnel/file/hadoop/HadoopFileSystemProxyTest.java b/seatunnel-connectors-v2/connector-file/connector-file-base/src/test/java/org/apache/seatunnel/connectors/seatunnel/file/hadoop/HadoopFileSystemProxyTest.java
new file mode 100644
index 0000000000..f4401bdadc
--- /dev/null
+++ b/seatunnel-connectors-v2/connector-file/connector-file-base/src/test/java/org/apache/seatunnel/connectors/seatunnel/file/hadoop/HadoopFileSystemProxyTest.java
@@ -0,0 +1,104 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *    http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.seatunnel.connectors.seatunnel.file.hadoop;
+
+import org.apache.seatunnel.connectors.seatunnel.file.config.HadoopConf;
+
+import org.apache.hadoop.fs.Path;
+
+import org.junit.jupiter.api.Assertions;
+import org.junit.jupiter.api.Test;
+import org.junit.jupiter.api.condition.DisabledOnOs;
+import org.junit.jupiter.api.condition.OS;
+import org.junit.jupiter.api.io.TempDir;
+
+import java.io.IOException;
+import java.nio.charset.StandardCharsets;
+import java.nio.file.Files;
+
+class HadoopFileSystemProxyTest {
+
+    @TempDir private java.nio.file.Path tempDir;
+
+    @Test
+    void testMakeQualifiedPathUsesConfiguredFileSystemUri() throws Exception {
+        HadoopFileSystemProxy proxy = new HadoopFileSystemProxy(new HadoopConf("file:///"));
+        try {
+            Path qualifiedPath = new Path(proxy.makeQualifiedPath("/backup/post-sync"));
+
+            Assertions.assertEquals("file", qualifiedPath.toUri().getScheme());
+            Assertions.assertEquals("/backup/post-sync", qualifiedPath.toUri().getPath());
+        } finally {
+            proxy.close();
+        }
+    }
+
+    @Test
+    void testRenameRejectsMissingSourceAndTarget() throws Exception {
+        HadoopFileSystemProxy proxy = new HadoopFileSystemProxy(new HadoopConf("file:///"));
+        java.nio.file.Path source = tempDir.resolve("missing-source.bin");
+        java.nio.file.Path target = tempDir.resolve("missing-target.bin");
+        try {
+            IOException error =
+                    Assertions.assertThrows(
+                            IOException.class,
+                            () -> proxy.renameFile(source.toString(), target.toString(), false));
+
+            Assertions.assertTrue(error.getMessage().contains(source.getFileName().toString()));
+            Assertions.assertTrue(error.getMessage().contains(target.getFileName().toString()));
+        } finally {
+            proxy.close();
+        }
+    }
+
+    @Test
+    void testRenameTreatsExistingTargetAsCompletedRetry() throws Exception {
+        HadoopFileSystemProxy proxy = new HadoopFileSystemProxy(new HadoopConf("file:///"));
+        java.nio.file.Path source = tempDir.resolve("missing-source.bin");
+        java.nio.file.Path target = tempDir.resolve("existing-target.bin");
+        Files.write(target, "target".getBytes(StandardCharsets.UTF_8));
+        try {
+            proxy.renameFile(source.toString(), target.toString(), false);
+
+            Assertions.assertEquals(
+                    "target", new String(Files.readAllBytes(target), StandardCharsets.UTF_8));
+        } finally {
+            proxy.close();
+        }
+    }
+
+    @Test
+    @DisabledOnOs(
+            value = OS.WINDOWS,
+            disabledReason = "Hadoop local filesystem rename requires native Windows support")
+    void testRenameMovesExistingSource() throws Exception {
+        HadoopFileSystemProxy proxy = new HadoopFileSystemProxy(new HadoopConf("file:///"));
+        java.nio.file.Path source = tempDir.resolve("source.bin");
+        java.nio.file.Path target = tempDir.resolve("nested/target.bin");
+        Files.write(source, "source".getBytes(StandardCharsets.UTF_8));
+        try {
+            proxy.renameFile(source.toString(), target.toString(), false);
+
+            Assertions.assertFalse(Files.exists(source));
+            Assertions.assertEquals(
+                    "source", new String(Files.readAllBytes(target), StandardCharsets.UTF_8));
+        } finally {
+            proxy.close();
+        }
+    }
+}
diff --git a/seatunnel-connectors-v2/connector-file/connector-file-base/src/test/java/org/apache/seatunnel/connectors/seatunnel/file/sink/BaseFileSinkWriterTest.java b/seatunnel-connectors-v2/connector-file/connector-file-base/src/test/java/org/apache/seatunnel/connectors/seatunnel/file/sink/BaseFileSinkWriterTest.java
new file mode 100644
index 0000000000..d5ee30b07f
--- /dev/null
+++ b/seatunnel-connectors-v2/connector-file/connector-file-base/src/test/java/org/apache/seatunnel/connectors/seatunnel/file/sink/BaseFileSinkWriterTest.java
@@ -0,0 +1,84 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *    http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.seatunnel.connectors.seatunnel.file.sink;
+
+import org.apache.seatunnel.api.sink.SinkWriter;
+import org.apache.seatunnel.connectors.seatunnel.file.config.HadoopConf;
+import org.apache.seatunnel.connectors.seatunnel.file.hadoop.HadoopFileSystemProxy;
+import org.apache.seatunnel.connectors.seatunnel.file.sink.commit.FileSinkAggregatedCommitter;
+import org.apache.seatunnel.connectors.seatunnel.file.sink.config.FileSinkConfig;
+import org.apache.seatunnel.connectors.seatunnel.file.sink.state.FileSinkState;
+import org.apache.seatunnel.connectors.seatunnel.file.sink.writer.WriteStrategy;
+
+import org.apache.hadoop.fs.Path;
+
+import org.junit.jupiter.api.Assertions;
+import org.junit.jupiter.api.Test;
+import org.mockito.MockedConstruction;
+import org.mockito.Mockito;
+
+import java.util.Collections;
+import java.util.LinkedHashMap;
+
+class BaseFileSinkWriterTest {
+
+    private static final String JOB_ID = "job-1";
+    private static final String UUID_PREFIX = "uuid-1";
+    private static final String TRANSACTION_ID = "T_job-1_uuid-1_0_7";
+    private static final String TRANSACTION_DIR = "/tmp/seatunnel/" + TRANSACTION_ID;
+
+    @Test
+    void shouldNotReplayCommittedTransactionWhenRestoringWriterState() throws Exception {
+        WriteStrategy<?> writeStrategy = Mockito.mock(WriteStrategy.class);
+        HadoopFileSystemProxy fileSystemProxy = Mockito.mock(HadoopFileSystemProxy.class);
+        FileSinkConfig fileSinkConfig = Mockito.mock(FileSinkConfig.class);
+        SinkWriter.Context context = Mockito.mock(SinkWriter.Context.class);
+        FileSinkState state =
+                new FileSinkState(
+                        TRANSACTION_ID,
+                        UUID_PREFIX,
+                        7L,
+                        new LinkedHashMap<>(),
+                        new LinkedHashMap<>(),
+                        TRANSACTION_DIR);
+
+        Mockito.when(context.getIndexOfSubtask()).thenReturn(0);
+        Mockito.when(writeStrategy.getHadoopFileSystemProxy()).thenReturn(fileSystemProxy);
+        Mockito.when(writeStrategy.getFileSinkConfig()).thenReturn(fileSinkConfig);
+        Mockito.when(fileSinkConfig.getTmpPath()).thenReturn("/tmp/seatunnel");
+        Mockito.when(fileSystemProxy.getAllSubFiles(Mockito.anyString()))
+                .thenReturn(Collections.singletonList(new Path(TRANSACTION_ID)));
+
+        try (MockedConstruction<FileSinkAggregatedCommitter> ignored =
+                Mockito.mockConstruction(FileSinkAggregatedCommitter.class)) {
+            new BaseFileSinkWriter(
+                    writeStrategy,
+                    new HadoopConf("hdfs://dummy"),
+                    context,
+                    JOB_ID,
+                    Collections.singletonList(state));
+
+            Assertions.assertTrue(
+                    ignored.constructed().isEmpty(),
+                    "writer recovery must leave checkpoint commit replay to the aggregated committer");
+        }
+
+        Mockito.verify(writeStrategy).beginTransaction(8L);
+        Mockito.verify(writeStrategy, Mockito.never()).abortPrepare(TRANSACTION_ID);
+    }
+}
diff --git a/seatunnel-connectors-v2/connector-file/connector-file-base/src/test/java/org/apache/seatunnel/connectors/seatunnel/file/source/BaseMultipleTableFileSourceTest.java b/seatunnel-connectors-v2/connector-file/connector-file-base/src/test/java/org/apache/seatunnel/connectors/seatunnel/file/source/BaseMultipleTableFileSourceTest.java
new file mode 100644
index 0000000000..40543b990e
--- /dev/null
+++ b/seatunnel-connectors-v2/connector-file/connector-file-base/src/test/java/org/apache/seatunnel/connectors/seatunnel/file/source/BaseMultipleTableFileSourceTest.java
@@ -0,0 +1,90 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *    http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.seatunnel.connectors.seatunnel.file.source;
+
+import org.apache.seatunnel.api.configuration.ReadonlyConfig;
+import org.apache.seatunnel.api.source.Boundedness;
+import org.apache.seatunnel.connectors.seatunnel.file.config.BaseFileSourceConfig;
+import org.apache.seatunnel.connectors.seatunnel.file.config.BaseMultipleTableFileSourceConfig;
+import org.apache.seatunnel.connectors.seatunnel.file.config.FileBaseSourceOptions;
+import org.apache.seatunnel.connectors.seatunnel.file.exception.FileConnectorException;
+
+import org.junit.jupiter.api.Assertions;
+import org.junit.jupiter.api.Test;
+import org.mockito.Mockito;
+
+import java.util.Collections;
+import java.util.HashMap;
+import java.util.Map;
+
+class BaseMultipleTableFileSourceTest {
+
+    @Test
+    void testRejectPostSyncActionWhenDiscoveryModeOnce() {
+        BaseMultipleTableFileSource source = createSource("once", "delete");
+        FileConnectorException exception =
+                Assertions.assertThrows(FileConnectorException.class, source::getBoundedness);
+        Assertions.assertTrue(
+                exception
+                        .getMessage()
+                        .contains("post_sync_action only supports discovery_mode=continuous"),
+                "post_sync_action should be rejected when discovery_mode=once");
+    }
+
+    @Test
+    void testAllowPostSyncActionNoneWhenDiscoveryModeOnce() {
+        BaseMultipleTableFileSource source = createSource("once", "none");
+        Assertions.assertEquals(Boundedness.BOUNDED, source.getBoundedness());
+    }
+
+    @Test
+    void testAllowPostSyncActionWhenDiscoveryModeContinuous() {
+        BaseMultipleTableFileSource source = createSource("continuous", "delete");
+        Assertions.assertEquals(Boundedness.UNBOUNDED, source.getBoundedness());
+    }
+
+    private BaseMultipleTableFileSource createSource(String discoveryMode, String postSyncAction) {
+        Map<String, Object> config = new HashMap<>();
+        config.put(FileBaseSourceOptions.DISCOVERY_MODE.key(), discoveryMode);
+        config.put(FileBaseSourceOptions.POST_SYNC_ACTION.key(), postSyncAction);
+        ReadonlyConfig readonlyConfig = ReadonlyConfig.fromMap(config);
+
+        BaseFileSourceConfig baseFileSourceConfig = Mockito.mock(BaseFileSourceConfig.class);
+        Mockito.when(baseFileSourceConfig.getBaseFileSourceConfig()).thenReturn(readonlyConfig);
+
+        BaseMultipleTableFileSourceConfig multipleTableFileSourceConfig =
+                Mockito.mock(BaseMultipleTableFileSourceConfig.class);
+        Mockito.when(multipleTableFileSourceConfig.getFileSourceConfigs())
+                .thenReturn(Collections.singletonList(baseFileSourceConfig));
+
+        return new TestMultipleTableFileSource(multipleTableFileSourceConfig);
+    }
+
+    private static final class TestMultipleTableFileSource extends BaseMultipleTableFileSource {
+
+        private TestMultipleTableFileSource(
+                BaseMultipleTableFileSourceConfig baseMultipleTableFileSourceConfig) {
+            super(baseMultipleTableFileSourceConfig);
+        }
+
+        @Override
+        public String getPluginName() {
+            return "test_file_source";
+        }
+    }
+}
diff --git a/seatunnel-connectors-v2/connector-file/connector-file-base/src/test/java/org/apache/seatunnel/connectors/seatunnel/file/source/split/ContinuousMultipleTableFileSourceSplitEnumeratorPostSyncTest.java b/seatunnel-connectors-v2/connector-file/connector-file-base/src/test/java/org/apache/seatunnel/connectors/seatunnel/file/source/split/ContinuousMultipleTableFileSourceSplitEnumeratorPostSyncTest.java
new file mode 100644
index 0000000000..4d58560418
--- /dev/null
+++ b/seatunnel-connectors-v2/connector-file/connector-file-base/src/test/java/org/apache/seatunnel/connectors/seatunnel/file/source/split/ContinuousMultipleTableFileSourceSplitEnumeratorPostSyncTest.java
@@ -0,0 +1,206 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *    http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.seatunnel.connectors.seatunnel.file.source.split;
+
+import org.apache.seatunnel.api.configuration.ReadonlyConfig;
+import org.apache.seatunnel.api.source.SourceSplitEnumerator;
+import org.apache.seatunnel.api.table.catalog.CatalogTable;
+import org.apache.seatunnel.api.table.catalog.TableIdentifier;
+import org.apache.seatunnel.connectors.seatunnel.file.config.BaseFileSourceConfig;
+import org.apache.seatunnel.connectors.seatunnel.file.config.BaseMultipleTableFileSourceConfig;
+import org.apache.seatunnel.connectors.seatunnel.file.config.FileBaseSourceOptions;
+import org.apache.seatunnel.connectors.seatunnel.file.config.FilePostSyncAction;
+import org.apache.seatunnel.connectors.seatunnel.file.hadoop.HadoopFileSystemProxy;
+import org.apache.seatunnel.connectors.seatunnel.file.source.state.FileSourceOperationState;
+import org.apache.seatunnel.connectors.seatunnel.file.source.state.FileSourceState;
+import org.apache.seatunnel.connectors.seatunnel.file.util.LocalFileSystemConf.LocalConf;
+
+import org.apache.hadoop.fs.FileStatus;
+
+import org.junit.jupiter.api.Assertions;
+import org.junit.jupiter.api.Test;
+import org.junit.jupiter.api.condition.DisabledOnOs;
+import org.junit.jupiter.api.condition.OS;
+import org.junit.jupiter.api.io.TempDir;
+import org.mockito.Mockito;
+
+import java.nio.charset.StandardCharsets;
+import java.nio.file.Files;
+import java.nio.file.Path;
+import java.util.ArrayList;
+import java.util.Collections;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+
+import static org.apache.hadoop.fs.CommonConfigurationKeysPublic.FS_DEFAULT_NAME_DEFAULT;
+
+@DisabledOnOs(
+        value = OS.WINDOWS,
+        disabledReason = "Hadoop local filesystem path handling is not supported on Windows")
+class ContinuousMultipleTableFileSourceSplitEnumeratorPostSyncTest {
+
+    private static final String TABLE_ID =
+            TableIdentifier.of("catalog", "db", "table").toTablePath().toString();
+
+    @TempDir private Path tempDir;
+
+    @Test
+    void testPostSyncBackupRetriesWhenSourceAndTargetAreTemporarilyMissing() throws Exception {
+        Path sourceDir = tempDir.resolve("source");
+        Path sourcePath = sourceDir.resolve("temporarily-missing-source.bin");
+        Path backupTargetPath = tempDir.resolve("backup/temporarily-missing-backup.bin");
+        FileSourceOperationState operation =
+                new FileSourceOperationState(
+                        TABLE_ID,
+                        "temporarily-missing-source",
+                        sourcePath.toString(),
+                        3L,
+                        1L,
+                        FilePostSyncAction.BACKUP,
+                        backupTargetPath.toString());
+        Map<Long, List<FileSourceOperationState>> pendingOperations = new HashMap<>();
+        pendingOperations.put(1L, new ArrayList<>(Collections.singletonList(operation)));
+
+        ContinuousMultipleTableFileSourceSplitEnumerator enumerator =
+                createEnumerator(
+                        sourceDir,
+                        tempDir.resolve("target"),
+                        new FileSourceState(
+                                Collections.emptySet(),
+                                System.currentTimeMillis(),
+                                pendingOperations,
+                                Collections.emptyMap()));
+        try {
+            enumerator.notifyCheckpointComplete(1L);
+
+            FileSourceState stateAfterRetry = enumerator.snapshotState(2L);
+            Assertions.assertTrue(
+                    stateAfterRetry.getPendingOpsByCheckpoint().containsKey(1L),
+                    "an ambiguously missing backup operation must remain pending for retry");
+            Assertions.assertEquals(
+                    1,
+                    stateAfterRetry.getPendingOpsByCheckpoint().get(1L).get(0).getRetryCount(),
+                    "an ambiguously missing backup operation must increment its retry count");
+        } finally {
+            enumerator.close();
+        }
+    }
+
+    @Test
+    void testPostSyncBackupWaitsUntilSinkTargetContainsSourceData() throws Exception {
+        Path sourceDir = tempDir.resolve("source");
+        Path sourcePath = sourceDir.resolve("source.bin");
+        Path targetDir = tempDir.resolve("target");
+        Path targetPath = targetDir.resolve("source.bin");
+        Path backupTargetPath = tempDir.resolve("backup/source.bin.v3_1");
+        Files.createDirectories(sourceDir);
+        Files.write(sourcePath, "abc".getBytes(StandardCharsets.UTF_8));
+        FileStatus sourceStatus;
+        try (HadoopFileSystemProxy sourceFs =
+                new HadoopFileSystemProxy(new LocalConf(FS_DEFAULT_NAME_DEFAULT))) {
+            sourceStatus = sourceFs.getFileStatus(sourcePath.toString());
+        }
+        FileSourceOperationState operation =
+                new FileSourceOperationState(
+                        TABLE_ID,
+                        "source",
+                        sourcePath.toString(),
+                        sourceStatus.getLen(),
+                        sourceStatus.getModificationTime(),
+                        FilePostSyncAction.BACKUP,
+                        backupTargetPath.toString());
+        Map<Long, List<FileSourceOperationState>> pendingOperations = new HashMap<>();
+        pendingOperations.put(1L, new ArrayList<>(Collections.singletonList(operation)));
+
+        ContinuousMultipleTableFileSourceSplitEnumerator enumerator =
+                createEnumerator(
+                        sourceDir,
+                        targetDir,
+                        new FileSourceState(
+                                Collections.emptySet(),
+                                System.currentTimeMillis(),
+                                pendingOperations,
+                                Collections.emptyMap()));
+        try {
+            enumerator.notifyCheckpointComplete(1L);
+
+            Assertions.assertTrue(
+                    Files.exists(sourcePath),
+                    "source must remain until the sink target is durably visible");
+            Assertions.assertFalse(Files.exists(backupTargetPath));
+            Assertions.assertTrue(
+                    enumerator.snapshotState(2L).getPendingOpsByCheckpoint().containsKey(1L));
+
+            Files.createDirectories(targetDir);
+            Files.write(targetPath, "abc".getBytes(StandardCharsets.UTF_8));
+            enumerator.notifyCheckpointComplete(2L);
+
+            Assertions.assertFalse(Files.exists(sourcePath));
+            Assertions.assertTrue(Files.exists(backupTargetPath));
+            Assertions.assertFalse(
+                    enumerator.snapshotState(3L).getPendingOpsByCheckpoint().containsKey(1L));
+        } finally {
+            enumerator.close();
+        }
+    }
+
+    private static ContinuousMultipleTableFileSourceSplitEnumerator createEnumerator(
+            Path sourceDir, Path targetDir, FileSourceState checkpointState) {
+        Map<String, Object> config = new HashMap<>();
+        config.put(FileBaseSourceOptions.FILE_PATH.key(), sourceDir.toString());
+        config.put(FileBaseSourceOptions.FILE_FORMAT_TYPE.key(), "binary");
+        config.put(FileBaseSourceOptions.DISCOVERY_MODE.key(), "continuous");
+        config.put(FileBaseSourceOptions.START_MODE.key(), "earliest");
+        config.put(FileBaseSourceOptions.SYNC_MODE.key(), "update");
+        config.put(FileBaseSourceOptions.TARGET_PATH.key(), targetDir.toString());
+        config.put(FileBaseSourceOptions.UPDATE_STRATEGY.key(), "distcp");
+        config.put(FileBaseSourceOptions.COMPARE_MODE.key(), "len_mtime");
+        config.put(FileBaseSourceOptions.POST_SYNC_ACTION.key(), "backup");
+        config.put(FileBaseSourceOptions.BACKUP_PATH.key(), targetDir.resolve("backup").toString());
+
+        BaseFileSourceConfig baseFileSourceConfig = Mockito.mock(BaseFileSourceConfig.class);
+        Mockito.when(baseFileSourceConfig.getBaseFileSourceConfig())
+                .thenReturn(ReadonlyConfig.fromMap(config));
+        Mockito.when(baseFileSourceConfig.getHadoopConfig())
+                .thenReturn(new LocalConf(FS_DEFAULT_NAME_DEFAULT));
+        Mockito.when(baseFileSourceConfig.getCatalogTable())
+                .thenReturn(
+                        CatalogTable.of(
+                                TableIdentifier.of("catalog", "db", "table"),
+                                null,
+                                new HashMap<>(),
+                                Collections.emptyList(),
+                                null));
+
+        BaseMultipleTableFileSourceConfig multipleTableFileSourceConfig =
+                Mockito.mock(BaseMultipleTableFileSourceConfig.class);
+        Mockito.when(multipleTableFileSourceConfig.getFileSourceConfigs())
+                .thenReturn(Collections.singletonList(baseFileSourceConfig));
+
+        SourceSplitEnumerator.Context<FileSourceSplit> context =
+                Mockito.mock(SourceSplitEnumerator.Context.class);
+        Mockito.when(context.currentParallelism()).thenReturn(1);
+
+        return new ContinuousMultipleTableFileSourceSplitEnumerator(
+                context,
+                multipleTableFileSourceConfig,
+                new DefaultFileSplitStrategy(),
+                checkpointState);
+    }
+}
diff --git a/seatunnel-connectors-v2/connector-file/connector-file-base/src/test/java/org/apache/seatunnel/connectors/seatunnel/file/source/split/ContinuousMultipleTableFileSourceSplitEnumeratorTest.java b/seatunnel-connectors-v2/connector-file/connector-file-base/src/test/java/org/apache/seatunnel/connectors/seatunnel/file/source/split/ContinuousMultipleTableFileSourceSplitEnumeratorTest.java
index c9178aa194..fa97267f50 100644
--- a/seatunnel-connectors-v2/connector-file/connector-file-base/src/test/java/org/apache/seatunnel/connectors/seatunnel/file/source/split/ContinuousMultipleTableFileSourceSplitEnumeratorTest.java
+++ b/seatunnel-connectors-v2/connector-file/connector-file-base/src/test/java/org/apache/seatunnel/connectors/seatunnel/file/source/split/ContinuousMultipleTableFileSourceSplitEnumeratorTest.java
@@ -24,17 +24,23 @@ import org.apache.seatunnel.api.table.catalog.TableIdentifier;
 import org.apache.seatunnel.connectors.seatunnel.file.config.BaseFileSourceConfig;
 import org.apache.seatunnel.connectors.seatunnel.file.config.BaseMultipleTableFileSourceConfig;
 import org.apache.seatunnel.connectors.seatunnel.file.config.FileBaseSourceOptions;
+import org.apache.seatunnel.connectors.seatunnel.file.config.FilePostSyncAction;
 import org.apache.seatunnel.connectors.seatunnel.file.config.HadoopConf;
 import org.apache.seatunnel.connectors.seatunnel.file.exception.FileConnectorException;
+import org.apache.seatunnel.connectors.seatunnel.file.hadoop.HadoopFileSystemProxy;
 import org.apache.seatunnel.connectors.seatunnel.file.source.event.FileSplitFinishedEvent;
+import org.apache.seatunnel.connectors.seatunnel.file.source.state.FileSourceOperationState;
 import org.apache.seatunnel.connectors.seatunnel.file.source.state.FileSourceState;
 
+import org.apache.hadoop.fs.FileStatus;
+
 import org.junit.jupiter.api.Assertions;
 import org.junit.jupiter.api.Test;
 import org.junit.jupiter.api.condition.DisabledOnOs;
 import org.junit.jupiter.api.condition.OS;
 import org.junit.jupiter.api.io.TempDir;
 import org.mockito.ArgumentCaptor;
+import org.mockito.MockedConstruction;
 import org.mockito.Mockito;
 
 import java.io.IOException;
@@ -43,11 +49,19 @@ import java.nio.file.Files;
 import java.nio.file.Path;
 import java.nio.file.StandardCopyOption;
 import java.nio.file.attribute.FileTime;
+import java.security.MessageDigest;
+import java.security.NoSuchAlgorithmException;
 import java.time.Duration;
+import java.util.ArrayList;
 import java.util.Collections;
 import java.util.HashMap;
 import java.util.List;
 import java.util.Map;
+import java.util.concurrent.CountDownLatch;
+import java.util.concurrent.ExecutorService;
+import java.util.concurrent.Executors;
+import java.util.concurrent.Future;
+import java.util.concurrent.TimeUnit;
 import java.util.stream.Collectors;
 
 import static org.apache.hadoop.fs.CommonConfigurationKeysPublic.FS_DEFAULT_NAME_DEFAULT;
@@ -376,19 +390,1263 @@ class ContinuousMultipleTableFileSourceSplitEnumeratorTest {
         Path srcDir = Files.createDirectories(tempDir.resolve("src8"));
         Path dstDir = Files.createDirectories(tempDir.resolve("dst8"));
 
-        Map<String, Object> config = new HashMap<>();
-        config.put(FileBaseSourceOptions.FILE_PATH.key(), srcDir.toString());
-        config.put(FileBaseSourceOptions.FILE_FORMAT_TYPE.key(), "binary");
-        config.put(FileBaseSourceOptions.DISCOVERY_MODE.key(), "continuous");
-        config.put(FileBaseSourceOptions.START_MODE.key(), "earliest");
-        config.put(FileBaseSourceOptions.SYNC_MODE.key(), "update");
-        config.put(FileBaseSourceOptions.TARGET_PATH.key(), dstDir.toString());
-        config.put(FileBaseSourceOptions.UPDATE_STRATEGY.key(), "distcp");
-        config.put(FileBaseSourceOptions.COMPARE_MODE.key(), "len_mtime");
+        Map<String, Object> config = baseContinuousConfig(srcDir, dstDir);
         config.put(FileBaseSourceOptions.SCAN_INTERVAL.key(), Duration.ZERO);
 
-        ReadonlyConfig readonlyConfig = ReadonlyConfig.fromMap(config);
+        FileConnectorException exception =
+                Assertions.assertThrows(
+                        FileConnectorException.class,
+                        () -> createValidationEnumerator(ReadonlyConfig.fromMap(config)));
+        Assertions.assertTrue(
+                exception.getMessage().contains("scan_interval > 0"),
+                "continuous mode should require a positive scan_interval");
+    }
+
+    @Test
+    void testContinuousDiscoveryBackupActionRequiresBackupPath() throws Exception {
+        Path srcDir = Files.createDirectories(tempDir.resolve("src9"));
+        Path dstDir = Files.createDirectories(tempDir.resolve("dst9"));
+
+        Map<String, Object> config = baseContinuousConfig(srcDir, dstDir);
+        config.put(FileBaseSourceOptions.POST_SYNC_ACTION.key(), "backup");
+
+        FileConnectorException exception =
+                Assertions.assertThrows(
+                        FileConnectorException.class,
+                        () -> createValidationEnumerator(ReadonlyConfig.fromMap(config)));
+        Assertions.assertTrue(
+                exception.getMessage().contains("post_sync_action=backup requires backup_path"),
+                "backup action should require backup_path");
+    }
+
+    @Test
+    void testContinuousDiscoveryBackupActionRejectsCrossFileSystemBackupPath() throws Exception {
+        Path srcDir = Files.createDirectories(tempDir.resolve("src9_cross_fs"));
+        Path dstDir = Files.createDirectories(tempDir.resolve("dst9_cross_fs"));
+
+        Map<String, Object> config = baseContinuousConfig(srcDir, dstDir);
+        config.put(FileBaseSourceOptions.POST_SYNC_ACTION.key(), "backup");
+        config.put(FileBaseSourceOptions.BACKUP_PATH.key(), "hdfs://cluster-b/backup");
+
+        FileConnectorException exception =
+                Assertions.assertThrows(
+                        FileConnectorException.class,
+                        () -> createValidationEnumerator(ReadonlyConfig.fromMap(config)));
+        Assertions.assertTrue(
+                exception.getMessage().contains("same-filesystem backup"),
+                "backup action should reject cross-file-system backup_path in phase-1");
+    }
+
+    @Test
+    void testContinuousDiscoveryBackupActionRejectsOverlappingBackupPath() throws Exception {
+        Path rootDir = Files.createDirectories(tempDir.resolve("overlap_root"));
+        Path srcDir = Files.createDirectories(rootDir.resolve("src"));
+        Path dstDir = Files.createDirectories(rootDir.resolve("dst"));
+
+        Map<String, Object> nestedBackupConfig = baseContinuousConfig(srcDir, dstDir);
+        nestedBackupConfig.put(FileBaseSourceOptions.POST_SYNC_ACTION.key(), "backup");
+        nestedBackupConfig.put(
+                FileBaseSourceOptions.BACKUP_PATH.key(), srcDir.resolve("backup").toString());
+
+        FileConnectorException nestedBackupException =
+                Assertions.assertThrows(
+                        FileConnectorException.class,
+                        () ->
+                                createValidationEnumerator(
+                                        ReadonlyConfig.fromMap(nestedBackupConfig)));
+        Assertions.assertTrue(
+                nestedBackupException.getMessage().contains("must not overlap with path"),
+                "backup_path under source path should be rejected");
+
+        Map<String, Object> parentBackupConfig = baseContinuousConfig(srcDir, dstDir);
+        parentBackupConfig.put(FileBaseSourceOptions.POST_SYNC_ACTION.key(), "backup");
+        parentBackupConfig.put(FileBaseSourceOptions.BACKUP_PATH.key(), rootDir.toString());
+
+        FileConnectorException parentBackupException =
+                Assertions.assertThrows(
+                        FileConnectorException.class,
+                        () ->
+                                createValidationEnumerator(
+                                        ReadonlyConfig.fromMap(parentBackupConfig)));
+        Assertions.assertTrue(
+                parentBackupException.getMessage().contains("must not overlap with path"),
+                "source path under backup_path should be rejected");
+    }
+
+    @Test
+    void testContinuousDiscoveryBackupActionRejectsSymlinkedOverlappingBackupPath()
+            throws Exception {
+        Path rootDir = Files.createDirectories(tempDir.resolve("symlink_overlap_root"));
+        Path srcDir = Files.createDirectories(rootDir.resolve("src"));
+        Path dstDir = Files.createDirectories(rootDir.resolve("dst"));
+        Path rootAlias = tempDir.resolve("symlink_overlap_alias");
+        Files.createSymbolicLink(rootAlias, rootDir);
+
+        Map<String, Object> config = baseContinuousConfig(srcDir, dstDir);
+        config.put(FileBaseSourceOptions.POST_SYNC_ACTION.key(), "backup");
+        config.put(
+                FileBaseSourceOptions.BACKUP_PATH.key(),
+                rootAlias.resolve("src").resolve("backup").toString());
+
+        FileConnectorException exception =
+                Assertions.assertThrows(
+                        FileConnectorException.class,
+                        () -> createValidationEnumerator(ReadonlyConfig.fromMap(config)));
+        Assertions.assertTrue(
+                exception.getMessage().contains("must not overlap with path"),
+                "a symlink alias under the source path must be rejected");
+    }
+
+    @Test
+    void testContinuousDiscoveryPostSyncActionRejectsFilesystemRoot() throws Exception {
+        Path dstDir = Files.createDirectories(tempDir.resolve("root_path_dst"));
+
+        Map<String, Object> config = baseContinuousConfig(java.nio.file.Paths.get("/"), dstDir);
+        config.put(FileBaseSourceOptions.POST_SYNC_ACTION.key(), "delete");
+
+        FileConnectorException exception =
+                Assertions.assertThrows(
+                        FileConnectorException.class,
+                        () -> createValidationEnumerator(ReadonlyConfig.fromMap(config)));
+        Assertions.assertTrue(
+                exception.getMessage().contains("non-root directory"),
+                "post-sync actions must reject the filesystem root");
+    }
+
+    @Test
+    void testContinuousDiscoveryDeleteActionRejectsBackupPath() throws Exception {
+        Path srcDir = Files.createDirectories(tempDir.resolve("src10"));
+        Path dstDir = Files.createDirectories(tempDir.resolve("dst10"));
+
+        Map<String, Object> config = baseContinuousConfig(srcDir, dstDir);
+        config.put(FileBaseSourceOptions.POST_SYNC_ACTION.key(), "delete");
+        config.put(FileBaseSourceOptions.BACKUP_PATH.key(), dstDir.resolve("backup").toString());
+
+        FileConnectorException exception =
+                Assertions.assertThrows(
+                        FileConnectorException.class,
+                        () -> createValidationEnumerator(ReadonlyConfig.fromMap(config)));
+        Assertions.assertTrue(
+                exception
+                        .getMessage()
+                        .contains("backup_path is only valid when post_sync_action=backup"),
+                "backup_path should be rejected unless action is backup");
+    }
+
+    @Test
+    void testContinuousDiscoveryRetentionRequiresBackupAction() throws Exception {
+        Path srcDir = Files.createDirectories(tempDir.resolve("src11"));
+        Path dstDir = Files.createDirectories(tempDir.resolve("dst11"));
+
+        Map<String, Object> config = baseContinuousConfig(srcDir, dstDir);
+        config.put(FileBaseSourceOptions.POST_SYNC_ACTION.key(), "delete");
+        config.put(FileBaseSourceOptions.RETENTION_MAX_AGE.key(), "1H");
+
+        FileConnectorException exception =
+                Assertions.assertThrows(
+                        FileConnectorException.class,
+                        () -> createValidationEnumerator(ReadonlyConfig.fromMap(config)));
+        Assertions.assertTrue(
+                exception
+                        .getMessage()
+                        .contains("retention_max_age is only valid when post_sync_action=backup"),
+                "retention_max_age should require backup action");
+    }
+
+    @Test
+    void testContinuousDiscoveryRetentionRequiresPositiveCheckInterval() throws Exception {
+        Path srcDir = Files.createDirectories(tempDir.resolve("src12"));
+        Path dstDir = Files.createDirectories(tempDir.resolve("dst12"));
+
+        Map<String, Object> config = baseContinuousConfig(srcDir, dstDir);
+        config.put(FileBaseSourceOptions.POST_SYNC_ACTION.key(), "backup");
+        config.put(FileBaseSourceOptions.BACKUP_PATH.key(), dstDir.resolve("backup").toString());
+        config.put(FileBaseSourceOptions.RETENTION_MAX_AGE.key(), "1H");
+        config.put(FileBaseSourceOptions.RETENTION_CHECK_INTERVAL.key(), "0S");
+
+        FileConnectorException exception =
+                Assertions.assertThrows(
+                        FileConnectorException.class,
+                        () -> createValidationEnumerator(ReadonlyConfig.fromMap(config)));
+        Assertions.assertTrue(
+                exception.getMessage().contains("retention_check_interval must be greater than 0"),
+                "retention_check_interval should be positive when retention is enabled");
+    }
+
+    @Test
+    void testContinuousDiscoveryNoneIgnoresStalePostSyncOptions() throws Exception {
+        Path srcDir = Files.createDirectories(tempDir.resolve("src_none_stale_options"));
+        Path dstDir = Files.createDirectories(tempDir.resolve("dst_none_stale_options"));
+
+        Map<String, Object> extraConfig = new HashMap<>();
+        extraConfig.put(FileBaseSourceOptions.POST_SYNC_ACTION.key(), "none");
+        extraConfig.put(
+                FileBaseSourceOptions.BACKUP_PATH.key(),
+                tempDir.resolve("unused_backup_path").toString());
+        extraConfig.put(FileBaseSourceOptions.RETENTION_MAX_AGE.key(), "7D");
+        extraConfig.put(FileBaseSourceOptions.RETENTION_CHECK_INTERVAL.key(), "1H");
+
+        EnumeratorWithContext enumeratorWithContext =
+                createEnumerator(
+                        srcDir,
+                        dstDir,
+                        "earliest",
+                        new FileSourceState(Collections.emptySet()),
+                        extraConfig);
+        enumeratorWithContext.enumerator.close();
+    }
+
+    @Test
+    void testSnapshotKeepsInFlightSplitWhilePostSyncOperationIsBuilt() throws Exception {
+        Path srcDir = Files.createDirectories(tempDir.resolve("src_atomic_completion"));
+        Path dstDir = Files.createDirectories(tempDir.resolve("dst_atomic_completion"));
+        Files.write(srcDir.resolve("test.bin"), "abc".getBytes());
+
+        Map<String, Object> extraConfig = new HashMap<>();
+        extraConfig.put(FileBaseSourceOptions.POST_SYNC_ACTION.key(), "delete");
+        EnumeratorWithContext enumeratorWithContext =
+                createEnumerator(
+                        srcDir,
+                        dstDir,
+                        "earliest",
+                        new FileSourceState(Collections.emptySet()),
+                        extraConfig);
+        ExecutorService completionExecutor = Executors.newSingleThreadExecutor();
+        CountDownLatch statusReadStarted = new CountDownLatch(1);
+        CountDownLatch allowStatusRead = new CountDownLatch(1);
+        Future<?> completionFuture = null;
+        try {
+            enumeratorWithContext.enumerator.scanOnceForTest();
+            enumeratorWithContext.enumerator.handleSplitRequest(0);
+
+            @SuppressWarnings("unchecked")
+            ArgumentCaptor<List<FileSourceSplit>> splitsCaptor =
+                    ArgumentCaptor.forClass((Class) List.class);
+            Mockito.verify(enumeratorWithContext.context)
+                    .assignSplit(Mockito.eq(0), splitsCaptor.capture());
+            FileSourceSplit assigned = splitsCaptor.getValue().get(0);
+
+            Field inFlightContextsField =
+                    ContinuousMultipleTableFileSourceSplitEnumerator.class.getDeclaredField(
+                            "inFlightSplitContexts");
+            inFlightContextsField.setAccessible(true);
+            @SuppressWarnings("unchecked")
+            Map<String, Object> inFlightContexts =
+                    (Map<String, Object>)
+                            inFlightContextsField.get(enumeratorWithContext.enumerator);
+            Object inFlightContext = inFlightContexts.get(assigned.splitId());
+            Field splitVersionField = inFlightContext.getClass().getDeclaredField("splitVersion");
+            splitVersionField.setAccessible(true);
+            splitVersionField.set(inFlightContext, null);
+
+            Field tableScanContextsField =
+                    ContinuousMultipleTableFileSourceSplitEnumerator.class.getDeclaredField(
+                            "tableScanContexts");
+            tableScanContextsField.setAccessible(true);
+            List<?> tableScanContexts =
+                    (List<?>) tableScanContextsField.get(enumeratorWithContext.enumerator);
+            Object tableScanContext = tableScanContexts.get(0);
+            Field sourceFsField = tableScanContext.getClass().getDeclaredField("sourceFs");
+            sourceFsField.setAccessible(true);
+            HadoopFileSystemProxy sourceFs =
+                    (HadoopFileSystemProxy) sourceFsField.get(tableScanContext);
+            HadoopFileSystemProxy blockingSourceFs = Mockito.spy(sourceFs);
+            Mockito.doAnswer(
+                            invocation -> {
+                                statusReadStarted.countDown();
+                                if (!allowStatusRead.await(30, TimeUnit.SECONDS)) {
+                                    throw new AssertionError(
+                                            "timed out waiting to resume split version lookup");
+                                }
+                                return invocation.callRealMethod();
+                            })
+                    .when(blockingSourceFs)
+                    .getFileStatus(Mockito.anyString());
+            sourceFsField.set(tableScanContext, blockingSourceFs);
+
+            completionFuture =
+                    completionExecutor.submit(
+                            () ->
+                                    enumeratorWithContext.enumerator.handleSourceEvent(
+                                            0, new FileSplitFinishedEvent(assigned.splitId())));
+
+            Assertions.assertTrue(
+                    statusReadStarted.await(30, TimeUnit.SECONDS),
+                    "split completion should reach the blocked version lookup");
+            FileSourceState transitionSnapshot = enumeratorWithContext.enumerator.snapshotState(1L);
+
+            Assertions.assertTrue(
+                    transitionSnapshot.getAssignedSplit().contains(assigned),
+                    "a snapshot taken while the operation is built must retain the in-flight split");
+            Assertions.assertTrue(
+                    transitionSnapshot.getPendingOpsByCheckpoint().isEmpty(),
+                    "the operation must not be checkpointed before it is fully built");
+        } finally {
+            allowStatusRead.countDown();
+            if (completionFuture != null) {
+                completionFuture.get(30, TimeUnit.SECONDS);
+            }
+            completionExecutor.shutdownNow();
+            enumeratorWithContext.enumerator.close();
+        }
+    }
+
+    @Test
+    void testPostSyncDeleteCommittedAfterCheckpointComplete() throws Exception {
+        Path srcDir = Files.createDirectories(tempDir.resolve("src13"));
+        Path dstDir = Files.createDirectories(tempDir.resolve("dst13"));
+        Path srcFile = srcDir.resolve("test.bin");
+        Files.write(srcFile, "abc".getBytes());
+
+        Map<String, Object> extraConfig = new HashMap<>();
+        extraConfig.put(FileBaseSourceOptions.POST_SYNC_ACTION.key(), "delete");
+        EnumeratorWithContext enumeratorWithContext =
+                createEnumerator(
+                        srcDir,
+                        dstDir,
+                        "earliest",
+                        new FileSourceState(Collections.emptySet()),
+                        extraConfig);
+        try {
+            enumeratorWithContext.enumerator.scanOnceForTest();
+            enumeratorWithContext.enumerator.handleSplitRequest(0);
+
+            @SuppressWarnings("unchecked")
+            ArgumentCaptor<List<FileSourceSplit>> splitsCaptor =
+                    ArgumentCaptor.forClass((Class) List.class);
+            Mockito.verify(enumeratorWithContext.context)
+                    .assignSplit(Mockito.eq(0), splitsCaptor.capture());
+            FileSourceSplit assigned = splitsCaptor.getValue().get(0);
+
+            enumeratorWithContext.enumerator.handleSourceEvent(
+                    0, new FileSplitFinishedEvent(assigned.splitId()));
+            Assertions.assertTrue(
+                    Files.exists(srcFile), "source file should exist before checkpoint complete");
+
+            FileSourceState state = enumeratorWithContext.enumerator.snapshotState(1L);
+            Assertions.assertEquals(
+                    1,
+                    state.getPendingOpsByCheckpoint().get(1L).size(),
+                    "checkpoint should persist staged post-sync operation");
+
+            Files.write(dstDir.resolve("test.bin"), "abc".getBytes());
+            enumeratorWithContext.enumerator.notifyCheckpointComplete(1L);
+            Assertions.assertFalse(
+                    Files.exists(srcFile),
+                    "source file should be deleted after checkpoint complete");
+            try (java.util.stream.Stream<Path> remainingPaths = Files.list(srcDir)) {
+                Assertions.assertEquals(
+                        0L,
+                        remainingPaths.count(),
+                        "post-sync delete should not leave staging directories");
+            }
+        } finally {
+            enumeratorWithContext.enumerator.close();
+        }
+    }
+
+    @Test
+    void testRestorePendingPostSyncOperationSuppressesRediscovery() throws Exception {
+        Path srcDir = Files.createDirectories(tempDir.resolve("src13_restore_pending_operation"));
+        Path dstDir = Files.createDirectories(tempDir.resolve("dst13_restore_pending_operation"));
+        Files.write(srcDir.resolve("test.bin"), "abc".getBytes());
+
+        Map<String, Object> extraConfig = new HashMap<>();
+        extraConfig.put(FileBaseSourceOptions.POST_SYNC_ACTION.key(), "delete");
+        EnumeratorWithContext first =
+                createEnumerator(
+                        srcDir,
+                        dstDir,
+                        "earliest",
+                        new FileSourceState(Collections.emptySet()),
+                        extraConfig);
+        try {
+            stageSinglePostSyncOperation(first, 1L);
+            FileSourceState checkpointState = first.enumerator.snapshotState(2L);
+
+            EnumeratorWithContext restored =
+                    createEnumerator(srcDir, dstDir, "earliest", checkpointState, extraConfig);
+            try {
+                restored.enumerator.scanOnceForTest();
+                Assertions.assertEquals(
+                        0,
+                        restored.enumerator.currentUnassignedSplitSize(),
+                        "restored post-sync operations must suppress re-discovery of the same source version");
+            } finally {
+                restored.enumerator.close();
+            }
+        } finally {
+            first.enumerator.close();
+        }
+    }
+
+    @Test
+    void testPostSyncValidationClosesTemporaryFileSystems() throws Exception {
+        Path srcDir = Files.createDirectories(tempDir.resolve("src13_validation_close"));
+        Path dstDir = Files.createDirectories(tempDir.resolve("dst13_validation_close"));
+        Path backupDir = tempDir.resolve("backup13_validation_close");
+        Map<String, Object> extraConfig = new HashMap<>();
+        extraConfig.put(FileBaseSourceOptions.POST_SYNC_ACTION.key(), "backup");
+        extraConfig.put(FileBaseSourceOptions.BACKUP_PATH.key(), backupDir.toString());
+
+        try (MockedConstruction<HadoopFileSystemProxy> mockedFileSystems =
+                Mockito.mockConstruction(
+                        HadoopFileSystemProxy.class,
+                        (mock, context) ->
+                                Mockito.when(mock.makeQualifiedPath(Mockito.anyString()))
+                                        .thenAnswer(invocation -> invocation.getArgument(0)))) {
+            EnumeratorWithContext enumeratorWithContext =
+                    createEnumerator(
+                            srcDir,
+                            dstDir,
+                            "earliest",
+                            new FileSourceState(Collections.emptySet()),
+                            extraConfig);
+            try {
+                List<HadoopFileSystemProxy> constructed = mockedFileSystems.constructed();
+                Assertions.assertTrue(constructed.size() >= 2);
+                Mockito.verify(constructed.get(0)).close();
+                Mockito.verify(constructed.get(1)).close();
+            } finally {
+                enumeratorWithContext.enumerator.close();
+            }
+        }
+    }
+
+    @Test
+    void testPostSyncDeleteVersionGuardSkipsStaleOperation() throws Exception {
+        Path srcDir = Files.createDirectories(tempDir.resolve("src13_stale_delete"));
+        Path dstDir = Files.createDirectories(tempDir.resolve("dst13_stale_delete"));
+        Path srcFile = srcDir.resolve("test.bin");
+        Files.write(srcFile, "abc".getBytes());
+
+        Map<String, Object> extraConfig = new HashMap<>();
+        extraConfig.put(FileBaseSourceOptions.POST_SYNC_ACTION.key(), "delete");
+        EnumeratorWithContext enumeratorWithContext =
+                createEnumerator(
+                        srcDir,
+                        dstDir,
+                        "earliest",
+                        new FileSourceState(Collections.emptySet()),
+                        extraConfig);
+        try {
+            enumeratorWithContext.enumerator.scanOnceForTest();
+            enumeratorWithContext.enumerator.handleSplitRequest(0);
+
+            @SuppressWarnings("unchecked")
+            ArgumentCaptor<List<FileSourceSplit>> splitsCaptor =
+                    ArgumentCaptor.forClass((Class) List.class);
+            Mockito.verify(enumeratorWithContext.context)
+                    .assignSplit(Mockito.eq(0), splitsCaptor.capture());
+            FileSourceSplit assigned = splitsCaptor.getValue().get(0);
+
+            enumeratorWithContext.enumerator.handleSourceEvent(
+                    0, new FileSplitFinishedEvent(assigned.splitId()));
+            enumeratorWithContext.enumerator.snapshotState(1L);
+
+            Files.write(srcFile, "abcd".getBytes());
+            Files.setLastModifiedTime(
+                    srcFile, FileTime.fromMillis(System.currentTimeMillis() + 5_000));
+
+            enumeratorWithContext.enumerator.notifyCheckpointComplete(1L);
+
+            Assertions.assertTrue(
+                    Files.exists(srcFile),
+                    "new source version should not be deleted by stale post-sync delete operation");
+        } finally {
+            enumeratorWithContext.enumerator.close();
+        }
+    }
+
+    @Test
+    void testPostSyncDeleteSkipsStaleOperationWhenSourceContentChangesWithoutVersionDrift()
+            throws Exception {
+        Path srcDir = Files.createDirectories(tempDir.resolve("src13_same_version"));
+        Path dstDir = Files.createDirectories(tempDir.resolve("dst13_same_version"));
+        Path srcFile = srcDir.resolve("test.bin");
+        Path dstFile = dstDir.resolve("test.bin");
+        byte[] originalContent = "abc".getBytes();
+        byte[] recreatedContent = "xyz".getBytes();
+        Files.write(srcFile, originalContent);
+        Files.write(dstFile, originalContent);
+        long baseTime = System.currentTimeMillis();
+        Files.setLastModifiedTime(dstFile, FileTime.fromMillis(baseTime - 5_000));
+        Files.setLastModifiedTime(srcFile, FileTime.fromMillis(baseTime));
+
+        Map<String, Object> extraConfig = new HashMap<>();
+        extraConfig.put(FileBaseSourceOptions.POST_SYNC_ACTION.key(), "delete");
+        EnumeratorWithContext enumeratorWithContext =
+                createEnumerator(
+                        srcDir,
+                        dstDir,
+                        "earliest",
+                        new FileSourceState(Collections.emptySet()),
+                        extraConfig);
+        try {
+            FileSourceOperationState operation =
+                    stageSinglePostSyncOperation(enumeratorWithContext, 1L);
+            Files.write(srcFile, recreatedContent);
+            Files.setLastModifiedTime(
+                    srcFile, FileTime.fromMillis(operation.getSourceModificationTime()));
+
+            enumeratorWithContext.enumerator.notifyCheckpointComplete(1L);
+
+            Assertions.assertTrue(
+                    Files.exists(srcFile),
+                    "stale delete should keep the recreated source file in place");
+            Assertions.assertArrayEquals(recreatedContent, Files.readAllBytes(srcFile));
+            Assertions.assertFalse(
+                    Files.exists(
+                            java.nio.file.Paths.get(
+                                    new org.apache.hadoop.fs.Path(
+                                                    ContinuousMultipleTableFileSourceSplitEnumerator
+                                                            .buildDeleteStagingPath(operation, 1L))
+                                            .toUri())),
+                    "stale delete should not leave behind a staged trash file");
+            Assertions.assertFalse(
+                    enumeratorWithContext
+                            .enumerator
+                            .snapshotState(2L)
+                            .getPendingOpsByCheckpoint()
+                            .containsKey(1L),
+                    "stale same-version delete should be skipped instead of retried forever");
+        } finally {
+            enumeratorWithContext.enumerator.close();
+        }
+    }
+
+    @Test
+    void testPostSyncBackupStagesTargetOnSourceFileSystem() throws Exception {
+        Path srcDir = Files.createDirectories(tempDir.resolve("src14_qualified_backup"));
+        Path dstDir = Files.createDirectories(tempDir.resolve("dst14_qualified_backup"));
+        Path backupDir = Files.createDirectories(tempDir.resolve("backup14_qualified_backup"));
+        Files.write(srcDir.resolve("test.bin"), "abc".getBytes());
+
+        Map<String, Object> extraConfig = new HashMap<>();
+        extraConfig.put(FileBaseSourceOptions.POST_SYNC_ACTION.key(), "backup");
+        extraConfig.put(FileBaseSourceOptions.BACKUP_PATH.key(), backupDir.toString());
+        EnumeratorWithContext enumeratorWithContext =
+                createEnumerator(
+                        srcDir,
+                        dstDir,
+                        "earliest",
+                        new FileSourceState(Collections.emptySet()),
+                        extraConfig);
+        try {
+            enumeratorWithContext.enumerator.scanOnceForTest();
+            enumeratorWithContext.enumerator.handleSplitRequest(0);
+
+            @SuppressWarnings("unchecked")
+            ArgumentCaptor<List<FileSourceSplit>> splitsCaptor =
+                    ArgumentCaptor.forClass((Class) List.class);
+            Mockito.verify(enumeratorWithContext.context)
+                    .assignSplit(Mockito.eq(0), splitsCaptor.capture());
+            FileSourceSplit assigned = splitsCaptor.getValue().get(0);
+            enumeratorWithContext.enumerator.handleSourceEvent(
+                    0, new FileSplitFinishedEvent(assigned.splitId()));
+
+            FileSourceOperationState operation =
+                    enumeratorWithContext
+                            .enumerator
+                            .snapshotState(1L)
+                            .getPendingOpsByCheckpoint()
+                            .get(1L)
+                            .get(0);
+            org.apache.hadoop.fs.Path backupTargetPath =
+                    new org.apache.hadoop.fs.Path(operation.getBackupTargetPath());
+            Assertions.assertEquals("file", backupTargetPath.toUri().getScheme());
+            Assertions.assertTrue(
+                    backupTargetPath.toUri().getPath().startsWith(backupDir.toString()),
+                    "backup target should remain on the source filesystem");
+        } finally {
+            enumeratorWithContext.enumerator.close();
+        }
+    }
+
+    @Test
+    void testPostSyncBackupVersionGuardSkipsStaleOperation() throws Exception {
+        Path srcDir = Files.createDirectories(tempDir.resolve("src14"));
+        Path dstDir = Files.createDirectories(tempDir.resolve("dst14"));
+        Path backupDir = Files.createDirectories(tempDir.resolve("backup14"));
+        Path srcFile = srcDir.resolve("test.bin");
+        Files.write(srcFile, "abc".getBytes());
+
+        Map<String, Object> extraConfig = new HashMap<>();
+        extraConfig.put(FileBaseSourceOptions.POST_SYNC_ACTION.key(), "backup");
+        extraConfig.put(FileBaseSourceOptions.BACKUP_PATH.key(), backupDir.toString());
+        EnumeratorWithContext enumeratorWithContext =
+                createEnumerator(
+                        srcDir,
+                        dstDir,
+                        "earliest",
+                        new FileSourceState(Collections.emptySet()),
+                        extraConfig);
+        try {
+            enumeratorWithContext.enumerator.scanOnceForTest();
+            enumeratorWithContext.enumerator.handleSplitRequest(0);
+
+            @SuppressWarnings("unchecked")
+            ArgumentCaptor<List<FileSourceSplit>> splitsCaptor =
+                    ArgumentCaptor.forClass((Class) List.class);
+            Mockito.verify(enumeratorWithContext.context)
+                    .assignSplit(Mockito.eq(0), splitsCaptor.capture());
+            FileSourceSplit assigned = splitsCaptor.getValue().get(0);
+            enumeratorWithContext.enumerator.handleSourceEvent(
+                    0, new FileSplitFinishedEvent(assigned.splitId()));
+            enumeratorWithContext.enumerator.snapshotState(1L);
+
+            // Simulate source file updated before post-sync commit.
+            Files.write(srcFile, "abcd".getBytes());
+            Files.setLastModifiedTime(
+                    srcFile, FileTime.fromMillis(System.currentTimeMillis() + 5_000));
+
+            enumeratorWithContext.enumerator.notifyCheckpointComplete(1L);
+
+            Assertions.assertTrue(
+                    Files.exists(srcFile),
+                    "new source version should not be moved by stale post-sync backup operation");
+            long backupFileCount;
+            try (java.util.stream.Stream<Path> stream = Files.walk(backupDir)) {
+                backupFileCount = stream.filter(Files::isRegularFile).count();
+            }
+            Assertions.assertEquals(0, backupFileCount, "stale backup operation should be skipped");
+        } finally {
+            enumeratorWithContext.enumerator.close();
+        }
+    }
+
+    @Test
+    void testPostSyncBackupWaitsForSinkTargetBeforeStagingSource() throws Exception {
+        Path srcDir = Files.createDirectories(tempDir.resolve("src14_wait_for_target"));
+        Path dstDir = Files.createDirectories(tempDir.resolve("dst14_wait_for_target"));
+        Path backupDir = Files.createDirectories(tempDir.resolve("backup14_wait_for_target"));
+        Path srcFile = srcDir.resolve("test.bin");
+        Path dstFile = dstDir.resolve("test.bin");
+        Files.write(srcFile, "abc".getBytes());
+
+        Map<String, Object> extraConfig = new HashMap<>();
+        extraConfig.put(FileBaseSourceOptions.POST_SYNC_ACTION.key(), "backup");
+        extraConfig.put(FileBaseSourceOptions.BACKUP_PATH.key(), backupDir.toString());
+        EnumeratorWithContext enumeratorWithContext =
+                createEnumerator(
+                        srcDir,
+                        dstDir,
+                        "earliest",
+                        new FileSourceState(Collections.emptySet()),
+                        extraConfig);
+        try {
+            FileSourceOperationState operation =
+                    stageSinglePostSyncOperation(enumeratorWithContext, 1L);
+            Path backupTarget =
+                    java.nio.file.Paths.get(
+                            new org.apache.hadoop.fs.Path(operation.getBackupTargetPath()).toUri());
+
+            HadoopFileSystemProxy sourceFs =
+                    getTableScanContextFileSystem(enumeratorWithContext.enumerator, "sourceFs");
+            HadoopFileSystemProxy sourceFsSpy = Mockito.spy(sourceFs);
+            setTableScanContextFileSystem(
+                    enumeratorWithContext.enumerator, "sourceFs", sourceFsSpy);
+
+            enumeratorWithContext.enumerator.notifyCheckpointComplete(1L);
+
+            Assertions.assertTrue(
+                    Files.exists(srcFile),
+                    "backup should keep the source visible while the sink target is not committed");
+            Assertions.assertFalse(
+                    Files.exists(backupTarget),
+                    "backup target should not be published before the sink target is committed");
+            Assertions.assertTrue(
+                    enumeratorWithContext
+                            .enumerator
+                            .snapshotState(2L)
+                            .getPendingOpsByCheckpoint()
+                            .containsKey(1L),
+                    "backup operation should remain pending until the sink target is committed");
+            Mockito.verify(sourceFsSpy, Mockito.never())
+                    .renameFile(
+                            Mockito.eq(operation.getSourcePath()),
+                            Mockito.anyString(),
+                            Mockito.eq(false));
+
+            Files.write(dstFile, "abc".getBytes());
+            enumeratorWithContext.enumerator.notifyCheckpointComplete(1L);
+
+            Assertions.assertFalse(
+                    Files.exists(srcFile),
+                    "backup commit should move the source after the sink target is committed");
+            Assertions.assertTrue(
+                    Files.exists(backupTarget),
+                    "backup target should be created after the sink target is committed");
+            Assertions.assertFalse(
+                    enumeratorWithContext
+                            .enumerator
+                            .snapshotState(3L)
+                            .getPendingOpsByCheckpoint()
+                            .containsKey(1L),
+                    "successful backup commit should clear the pending checkpoint operation");
+        } finally {
+            enumeratorWithContext.enumerator.close();
+        }
+    }
+
+    @Test
+    void testPostSyncBackupSkipsStaleOperationWhenSourceContentChangesWithoutVersionDrift()
+            throws Exception {
+        Path srcDir = Files.createDirectories(tempDir.resolve("src14_same_version"));
+        Path dstDir = Files.createDirectories(tempDir.resolve("dst14_same_version"));
+        Path backupDir = Files.createDirectories(tempDir.resolve("backup14_same_version"));
+        Path srcFile = srcDir.resolve("test.bin");
+        Path dstFile = dstDir.resolve("test.bin");
+        byte[] originalContent = "abc".getBytes();
+        byte[] recreatedContent = "xyz".getBytes();
+        Files.write(srcFile, originalContent);
+        Files.write(dstFile, originalContent);
+        long baseTime = System.currentTimeMillis();
+        Files.setLastModifiedTime(dstFile, FileTime.fromMillis(baseTime - 5_000));
+        Files.setLastModifiedTime(srcFile, FileTime.fromMillis(baseTime));
+
+        Map<String, Object> extraConfig = new HashMap<>();
+        extraConfig.put(FileBaseSourceOptions.POST_SYNC_ACTION.key(), "backup");
+        extraConfig.put(FileBaseSourceOptions.BACKUP_PATH.key(), backupDir.toString());
+        EnumeratorWithContext enumeratorWithContext =
+                createEnumerator(
+                        srcDir,
+                        dstDir,
+                        "earliest",
+                        new FileSourceState(Collections.emptySet()),
+                        extraConfig);
+        try {
+            FileSourceOperationState operation =
+                    stageSinglePostSyncOperation(enumeratorWithContext, 1L);
+            Files.write(srcFile, recreatedContent);
+            Files.setLastModifiedTime(
+                    srcFile, FileTime.fromMillis(operation.getSourceModificationTime()));
+
+            enumeratorWithContext.enumerator.notifyCheckpointComplete(1L);
+
+            Assertions.assertTrue(
+                    Files.exists(srcFile), "stale backup should restore the recreated source file");
+            Assertions.assertArrayEquals(recreatedContent, Files.readAllBytes(srcFile));
+            Assertions.assertFalse(
+                    Files.exists(
+                            java.nio.file.Paths.get(
+                                    new org.apache.hadoop.fs.Path(operation.getBackupTargetPath())
+                                            .toUri())),
+                    "stale backup should not publish a backup file for the wrong content");
+            Assertions.assertFalse(
+                    enumeratorWithContext
+                            .enumerator
+                            .snapshotState(2L)
+                            .getPendingOpsByCheckpoint()
+                            .containsKey(1L),
+                    "stale same-version backup should be skipped instead of retried forever");
+        } finally {
+            enumeratorWithContext.enumerator.close();
+        }
+    }
+
+    @Test
+    void testPostSyncBackupDoesNotSkipWhenSourceMtimeDriftsButContentStillMatchesTarget()
+            throws Exception {
+        Path srcDir = Files.createDirectories(tempDir.resolve("src14_source_mtime_drift"));
+        Path dstDir = Files.createDirectories(tempDir.resolve("dst14_source_mtime_drift"));
+        Path backupDir = Files.createDirectories(tempDir.resolve("backup14_source_mtime_drift"));
+        Path srcFile = srcDir.resolve("test.bin");
+        Path dstFile = dstDir.resolve("test.bin");
+        Files.write(srcFile, "abc".getBytes());
+        Files.write(dstFile, "abc".getBytes());
+
+        long baseTime = System.currentTimeMillis();
+        Files.setLastModifiedTime(dstFile, FileTime.fromMillis(baseTime - 5_000));
+        Files.setLastModifiedTime(srcFile, FileTime.fromMillis(baseTime));
+
+        Map<String, Object> extraConfig = new HashMap<>();
+        extraConfig.put(FileBaseSourceOptions.POST_SYNC_ACTION.key(), "backup");
+        extraConfig.put(FileBaseSourceOptions.BACKUP_PATH.key(), backupDir.toString());
+        EnumeratorWithContext enumeratorWithContext =
+                createEnumerator(
+                        srcDir,
+                        dstDir,
+                        "earliest",
+                        new FileSourceState(Collections.emptySet()),
+                        extraConfig);
+        try {
+            FileSourceOperationState operation =
+                    stageSinglePostSyncOperation(enumeratorWithContext, 1L);
+            HadoopFileSystemProxy sourceFs =
+                    getTableScanContextFileSystem(enumeratorWithContext.enumerator, "sourceFs");
+            HadoopFileSystemProxy sourceFsWithDriftedMtime = Mockito.spy(sourceFs);
+            Path backupTarget =
+                    java.nio.file.Paths.get(
+                            new org.apache.hadoop.fs.Path(operation.getBackupTargetPath()).toUri());
+
+            Mockito.doAnswer(
+                            invocation -> {
+                                String filePath = invocation.getArgument(0);
+                                FileStatus status = (FileStatus) invocation.callRealMethod();
+                                if (!operation.getSourcePath().equals(filePath) || status == null) {
+                                    return status;
+                                }
+                                return new FileStatus(
+                                        status.getLen(),
+                                        status.isDirectory(),
+                                        status.getReplication(),
+                                        status.getBlockSize(),
+                                        status.getModificationTime() + 60_000,
+                                        status.getAccessTime(),
+                                        status.getPermission(),
+                                        status.getOwner(),
+                                        status.getGroup(),
+                                        status.getPath());
+                            })
+                    .when(sourceFsWithDriftedMtime)
+                    .getFileStatus(Mockito.anyString());
+            setTableScanContextFileSystem(
+                    enumeratorWithContext.enumerator, "sourceFs", sourceFsWithDriftedMtime);
+
+            enumeratorWithContext.enumerator.notifyCheckpointComplete(1L);
+
+            Assertions.assertFalse(
+                    Files.exists(srcFile),
+                    "backup commit should not be skipped when unchanged source content only reports a drifted mtime");
+            Assertions.assertTrue(
+                    Files.exists(backupTarget),
+                    "backup target should still be created when the current source content matches the committed target");
+            FileSourceState state = enumeratorWithContext.enumerator.snapshotState(2L);
+            Assertions.assertFalse(
+                    state.getPendingOpsByCheckpoint().containsKey(1L),
+                    "successful backup commit should clear the pending checkpoint operation even when source mtime drifts");
+        } finally {
+            enumeratorWithContext.enumerator.close();
+        }
+    }
+
+    @Test
+    void testPostSyncDeleteCompletesStagedOperationAfterRestore() throws Exception {
+        Path srcDir = Files.createDirectories(tempDir.resolve("src14_staged_delete"));
+        Path dstDir = Files.createDirectories(tempDir.resolve("dst14_staged_delete"));
+        Path srcFile = srcDir.resolve("test.bin");
+        Path dstFile = dstDir.resolve("test.bin");
+        Files.write(srcFile, "abc".getBytes());
+
+        Map<String, Object> extraConfig = new HashMap<>();
+        extraConfig.put(FileBaseSourceOptions.POST_SYNC_ACTION.key(), "delete");
+        EnumeratorWithContext enumeratorWithContext =
+                createEnumerator(
+                        srcDir,
+                        dstDir,
+                        "earliest",
+                        new FileSourceState(Collections.emptySet()),
+                        extraConfig);
+        try {
+            FileSourceOperationState operation =
+                    stageSinglePostSyncOperation(enumeratorWithContext, 1L);
+            Path trashPath =
+                    java.nio.file.Paths.get(
+                            new org.apache.hadoop.fs.Path(
+                                            ContinuousMultipleTableFileSourceSplitEnumerator
+                                                    .buildDeleteStagingPath(operation, 1L))
+                                    .toUri());
+            Files.createDirectories(trashPath.getParent());
+            Files.move(srcFile, trashPath, StandardCopyOption.ATOMIC_MOVE);
+            Files.write(dstFile, "abc".getBytes());
+
+            enumeratorWithContext.enumerator.notifyCheckpointComplete(1L);
+
+            Assertions.assertFalse(
+                    Files.exists(trashPath),
+                    "a restored operation must delete its already-staged source file");
+            Assertions.assertFalse(
+                    Files.exists(srcFile), "source should remain absent after cleanup");
+        } finally {
+            enumeratorWithContext.enumerator.close();
+        }
+    }
+
+    @Test
+    void testPostSyncBackupLeavesRecreatedSourceWhenTargetAlreadyExists() throws Exception {
+        Path srcDir = Files.createDirectories(tempDir.resolve("src14_existing_backup"));
+        Path dstDir = Files.createDirectories(tempDir.resolve("dst14_existing_backup"));
+        Path backupDir = Files.createDirectories(tempDir.resolve("backup14_existing_backup"));
+        Path srcFile = srcDir.resolve("test.bin");
+        Files.write(srcFile, "abc".getBytes());
+
+        Map<String, Object> extraConfig = new HashMap<>();
+        extraConfig.put(FileBaseSourceOptions.POST_SYNC_ACTION.key(), "backup");
+        extraConfig.put(FileBaseSourceOptions.BACKUP_PATH.key(), backupDir.toString());
+        EnumeratorWithContext enumeratorWithContext =
+                createEnumerator(
+                        srcDir,
+                        dstDir,
+                        "earliest",
+                        new FileSourceState(Collections.emptySet()),
+                        extraConfig);
+        try {
+            FileSourceOperationState operation =
+                    stageSinglePostSyncOperation(enumeratorWithContext, 1L);
+            Path backupTarget =
+                    java.nio.file.Paths.get(
+                            new org.apache.hadoop.fs.Path(operation.getBackupTargetPath()).toUri());
+            Files.createDirectories(backupTarget.getParent());
+            Files.write(backupTarget, "abc".getBytes());
+
+            enumeratorWithContext.enumerator.notifyCheckpointComplete(1L);
+
+            Assertions.assertTrue(
+                    Files.exists(srcFile),
+                    "an existing backup target must never cause direct deletion of a recreated source");
+        } finally {
+            enumeratorWithContext.enumerator.close();
+        }
+    }
+
+    @Test
+    void testPostSyncBackupRecognizesCompletedRenameAfterRestore() throws Exception {
+        Path srcDir = Files.createDirectories(tempDir.resolve("src14_restore_backup"));
+        Path dstDir = Files.createDirectories(tempDir.resolve("dst14_restore_backup"));
+        Path backupDir = Files.createDirectories(tempDir.resolve("backup14_restore_backup"));
+        Path srcFile = srcDir.resolve("test.bin");
+        Files.write(srcFile, "abc".getBytes());
+
+        Map<String, Object> extraConfig = new HashMap<>();
+        extraConfig.put(FileBaseSourceOptions.POST_SYNC_ACTION.key(), "backup");
+        extraConfig.put(FileBaseSourceOptions.BACKUP_PATH.key(), backupDir.toString());
+        EnumeratorWithContext enumeratorWithContext =
+                createEnumerator(
+                        srcDir,
+                        dstDir,
+                        "earliest",
+                        new FileSourceState(Collections.emptySet()),
+                        extraConfig);
+        try {
+            FileSourceOperationState operation =
+                    stageSinglePostSyncOperation(enumeratorWithContext, 1L);
+            Path backupTarget =
+                    java.nio.file.Paths.get(
+                            new org.apache.hadoop.fs.Path(operation.getBackupTargetPath()).toUri());
+            Files.createDirectories(backupTarget.getParent());
+            Files.move(srcFile, backupTarget, StandardCopyOption.ATOMIC_MOVE);
+
+            enumeratorWithContext.enumerator.notifyCheckpointComplete(1L);
+
+            FileSourceState state = enumeratorWithContext.enumerator.snapshotState(2L);
+            Assertions.assertFalse(
+                    state.getPendingOpsByCheckpoint().containsKey(1L),
+                    "a matching destination after restore must complete the pending backup operation");
+        } finally {
+            enumeratorWithContext.enumerator.close();
+        }
+    }
 
+    @Test
+    void testPostSyncBackupDoesNotRollbackWhenRenameChangesBackupMtime() throws Exception {
+        Path srcDir = Files.createDirectories(tempDir.resolve("src14_backup_mtime"));
+        Path dstDir = Files.createDirectories(tempDir.resolve("dst14_backup_mtime"));
+        Path backupDir = Files.createDirectories(tempDir.resolve("backup14_backup_mtime"));
+        Path srcFile = srcDir.resolve("test.bin");
+        Path dstFile = dstDir.resolve("test.bin");
+        Files.write(dstFile, "abc".getBytes());
+        Files.write(srcFile, "abc".getBytes());
+        long baseTime = System.currentTimeMillis();
+        Files.setLastModifiedTime(dstFile, FileTime.fromMillis(baseTime - 5_000));
+        Files.setLastModifiedTime(srcFile, FileTime.fromMillis(baseTime));
+
+        Map<String, Object> extraConfig = new HashMap<>();
+        extraConfig.put(FileBaseSourceOptions.POST_SYNC_ACTION.key(), "backup");
+        extraConfig.put(FileBaseSourceOptions.BACKUP_PATH.key(), backupDir.toString());
+        EnumeratorWithContext enumeratorWithContext =
+                createEnumerator(
+                        srcDir,
+                        dstDir,
+                        "earliest",
+                        new FileSourceState(Collections.emptySet()),
+                        extraConfig);
+        try {
+            FileSourceOperationState operation =
+                    stageSinglePostSyncOperation(enumeratorWithContext, 1L);
+            HadoopFileSystemProxy sourceFs =
+                    getTableScanContextFileSystem(enumeratorWithContext.enumerator, "sourceFs");
+            HadoopFileSystemProxy mtimeMutatingSourceFs = Mockito.spy(sourceFs);
+            Path backupTarget =
+                    java.nio.file.Paths.get(
+                            new org.apache.hadoop.fs.Path(operation.getBackupTargetPath()).toUri());
+            Mockito.doAnswer(
+                            invocation -> {
+                                invocation.callRealMethod();
+                                String newFilePath = invocation.getArgument(1);
+                                Path renamedPath =
+                                        java.nio.file.Paths.get(
+                                                new org.apache.hadoop.fs.Path(newFilePath).toUri());
+                                if (renamedPath.startsWith(backupDir)) {
+                                    Files.setLastModifiedTime(
+                                            renamedPath,
+                                            FileTime.fromMillis(
+                                                    System.currentTimeMillis() + 60_000));
+                                }
+                                return null;
+                            })
+                    .when(mtimeMutatingSourceFs)
+                    .renameFile(Mockito.anyString(), Mockito.anyString(), Mockito.anyBoolean());
+            setTableScanContextFileSystem(
+                    enumeratorWithContext.enumerator, "sourceFs", mtimeMutatingSourceFs);
+            setTableScanContextFileSystem(
+                    enumeratorWithContext.enumerator, "targetFs", mtimeMutatingSourceFs);
+
+            enumeratorWithContext.enumerator.notifyCheckpointComplete(1L);
+
+            Assertions.assertFalse(
+                    Files.exists(srcFile),
+                    "backup commit should not restore the source file when only backup mtime changes");
+            Assertions.assertTrue(
+                    Files.exists(backupTarget),
+                    "backup target should remain in place after a successful backup commit");
+            FileSourceState state = enumeratorWithContext.enumerator.snapshotState(2L);
+            Assertions.assertFalse(
+                    state.getPendingOpsByCheckpoint().containsKey(1L),
+                    "successful backup commit should clear the pending checkpoint operation");
+        } finally {
+            enumeratorWithContext.enumerator.close();
+        }
+    }
+
+    @Test
+    void testPostSyncBackupRetainsInconsistentRestoreForRetry() throws Exception {
+        Path srcDir = Files.createDirectories(tempDir.resolve("src14_inconsistent_restore_backup"));
+        Path dstDir = Files.createDirectories(tempDir.resolve("dst14_inconsistent_restore_backup"));
+        Path backupDir =
+                Files.createDirectories(tempDir.resolve("backup14_inconsistent_restore_backup"));
+        Path srcFile = srcDir.resolve("test.bin");
+        Files.write(srcFile, "abc".getBytes());
+
+        Map<String, Object> extraConfig = new HashMap<>();
+        extraConfig.put(FileBaseSourceOptions.POST_SYNC_ACTION.key(), "backup");
+        extraConfig.put(FileBaseSourceOptions.BACKUP_PATH.key(), backupDir.toString());
+        EnumeratorWithContext enumeratorWithContext =
+                createEnumerator(
+                        srcDir,
+                        dstDir,
+                        "earliest",
+                        new FileSourceState(Collections.emptySet()),
+                        extraConfig);
+        try {
+            FileSourceOperationState operation =
+                    stageSinglePostSyncOperation(enumeratorWithContext, 1L);
+            Path backupTarget =
+                    java.nio.file.Paths.get(
+                            new org.apache.hadoop.fs.Path(operation.getBackupTargetPath()).toUri());
+            Files.createDirectories(backupTarget.getParent());
+            Files.move(srcFile, backupTarget, StandardCopyOption.ATOMIC_MOVE);
+            Files.write(backupTarget, "unexpected-content".getBytes());
+
+            enumeratorWithContext.enumerator.notifyCheckpointComplete(1L);
+
+            FileSourceState state = enumeratorWithContext.enumerator.snapshotState(2L);
+            Assertions.assertTrue(
+                    state.getPendingOpsByCheckpoint().containsKey(1L),
+                    "an inconsistent restored backup must remain pending instead of being accepted");
+        } finally {
+            enumeratorWithContext.enumerator.close();
+        }
+    }
+
+    @Test
+    void testPostSyncOperationRetryWhenContextMissing() throws Exception {
+        Path srcDir = Files.createDirectories(tempDir.resolve("src15"));
+        Path dstDir = Files.createDirectories(tempDir.resolve("dst15"));
+
+        FileSourceOperationState operationState =
+                new FileSourceOperationState(
+                        "unknown_table",
+                        "unknown_table_missing",
+                        srcDir.resolve("missing.bin").toString(),
+                        1L,
+                        1L,
+                        FilePostSyncAction.DELETE,
+                        null);
+
+        Map<Long, List<FileSourceOperationState>> pendingByCheckpoint = new HashMap<>();
+        pendingByCheckpoint.put(1L, new ArrayList<>(Collections.singletonList(operationState)));
+        FileSourceState checkpointState =
+                new FileSourceState(
+                        Collections.emptySet(),
+                        System.currentTimeMillis(),
+                        pendingByCheckpoint,
+                        new HashMap<>());
+
+        EnumeratorWithContext enumeratorWithContext =
+                createEnumerator(
+                        srcDir, dstDir, "earliest", checkpointState, Collections.emptyMap());
+        try {
+            enumeratorWithContext.enumerator.notifyCheckpointComplete(1L);
+            FileSourceState stateAfterRetry = enumeratorWithContext.enumerator.snapshotState(2L);
+
+            Assertions.assertTrue(
+                    stateAfterRetry.getPendingOpsByCheckpoint().containsKey(1L),
+                    "failed post-sync operation should remain pending for retry");
+            Assertions.assertEquals(
+                    1,
+                    stateAfterRetry.getPendingOpsByCheckpoint().get(1L).size(),
+                    "pending operation should remain after failed commit");
+            Assertions.assertTrue(
+                    stateAfterRetry.getPendingOpsByCheckpoint().get(1L).get(0).getRetryCount() >= 1,
+                    "retry counter should increase after failed commit");
+        } finally {
+            enumeratorWithContext.enumerator.close();
+        }
+    }
+
+    @Test
+    void testRetentionKeepsFreshBackupEvenWhenRenamePreservesAnExpiredSourceMtime()
+            throws Exception {
+        Path srcDir = Files.createDirectories(tempDir.resolve("src16_fresh_backup"));
+        Path dstDir = Files.createDirectories(tempDir.resolve("dst16_fresh_backup"));
+        Path backupDir = Files.createDirectories(tempDir.resolve("backup16_fresh_backup"));
+        Path srcFile = srcDir.resolve("test.bin");
+        Path dstFile = dstDir.resolve("test.bin");
+        byte[] content = "abc".getBytes();
+        Files.write(srcFile, content);
+        Files.write(dstFile, content);
+        long expiredSourceMtime = System.currentTimeMillis() - 60_000;
+        Files.setLastModifiedTime(dstFile, FileTime.fromMillis(expiredSourceMtime - 5_000));
+        Files.setLastModifiedTime(srcFile, FileTime.fromMillis(expiredSourceMtime));
+
+        Map<String, Object> extraConfig = new HashMap<>();
+        extraConfig.put(FileBaseSourceOptions.POST_SYNC_ACTION.key(), "backup");
+        extraConfig.put(FileBaseSourceOptions.BACKUP_PATH.key(), backupDir.toString());
+        extraConfig.put(FileBaseSourceOptions.RETENTION_MAX_AGE.key(), "1S");
+        extraConfig.put(FileBaseSourceOptions.RETENTION_CHECK_INTERVAL.key(), "1S");
+
+        EnumeratorWithContext enumeratorWithContext =
+                createEnumerator(
+                        srcDir,
+                        dstDir,
+                        "earliest",
+                        new FileSourceState(Collections.emptySet()),
+                        extraConfig);
+        try {
+            FileSourceOperationState operation =
+                    stageSinglePostSyncOperation(enumeratorWithContext, 1L);
+            Path backupTarget =
+                    java.nio.file.Paths.get(
+                            new org.apache.hadoop.fs.Path(operation.getBackupTargetPath()).toUri());
+            Assertions.assertTrue(
+                    backupTarget.getFileName().toString().matches(".+\\.v\\d+_\\d+_\\d+"),
+                    "backup target name should encode the backup creation time");
+
+            HadoopFileSystemProxy sourceFs =
+                    getTableScanContextFileSystem(enumeratorWithContext.enumerator, "sourceFs");
+            HadoopFileSystemProxy sourceFsWithExpiredBackupMtime = Mockito.spy(sourceFs);
+            Mockito.doAnswer(
+                            invocation -> {
+                                invocation.callRealMethod();
+                                String newFilePath = invocation.getArgument(1);
+                                Path renamedPath =
+                                        java.nio.file.Paths.get(
+                                                new org.apache.hadoop.fs.Path(newFilePath).toUri());
+                                if (renamedPath.startsWith(backupDir)
+                                        && Files.exists(renamedPath)) {
+                                    Files.setLastModifiedTime(
+                                            renamedPath, FileTime.fromMillis(expiredSourceMtime));
+                                }
+                                return null;
+                            })
+                    .when(sourceFsWithExpiredBackupMtime)
+                    .renameFile(Mockito.anyString(), Mockito.anyString(), Mockito.anyBoolean());
+            setTableScanContextFileSystem(
+                    enumeratorWithContext.enumerator, "sourceFs", sourceFsWithExpiredBackupMtime);
+
+            enumeratorWithContext.enumerator.notifyCheckpointComplete(1L);
+
+            Assertions.assertTrue(
+                    Files.exists(backupTarget),
+                    "retention should not delete a backup created in the current checkpoint");
+            Assertions.assertFalse(Files.exists(srcFile), "backup commit should still move source");
+            Assertions.assertFalse(
+                    enumeratorWithContext
+                            .enumerator
+                            .snapshotState(2L)
+                            .getPendingOpsByCheckpoint()
+                            .containsKey(1L),
+                    "successful backup commit should clear the pending checkpoint operation");
+        } finally {
+            enumeratorWithContext.enumerator.close();
+        }
+    }
+
+    @Test
+    void testRetentionKeepsExpiredFilesWithoutSeaTunnelVersionSuffix() throws Exception {
+        Path srcDir = Files.createDirectories(tempDir.resolve("src16_suffix"));
+        Path dstDir = Files.createDirectories(tempDir.resolve("dst16_suffix"));
+        Path backupDir = Files.createDirectories(tempDir.resolve("backup16_suffix"));
+        Path expiredManagedFile = backupDir.resolve("source.bin.v3_123456");
+        Path expiredUnmanagedFile = backupDir.resolve("unmanaged.bin");
+        Files.write(expiredManagedFile, "old-managed".getBytes());
+        Files.write(expiredUnmanagedFile, "old-unmanaged".getBytes());
+        FileTime expiredTime = FileTime.fromMillis(System.currentTimeMillis() - 60_000);
+        Files.setLastModifiedTime(expiredManagedFile, expiredTime);
+        Files.setLastModifiedTime(expiredUnmanagedFile, expiredTime);
+
+        Map<String, Object> extraConfig = new HashMap<>();
+        extraConfig.put(FileBaseSourceOptions.POST_SYNC_ACTION.key(), "backup");
+        extraConfig.put(FileBaseSourceOptions.BACKUP_PATH.key(), backupDir.toString());
+        extraConfig.put(FileBaseSourceOptions.RETENTION_MAX_AGE.key(), "1S");
+        extraConfig.put(FileBaseSourceOptions.RETENTION_CHECK_INTERVAL.key(), "1S");
+
+        EnumeratorWithContext enumeratorWithContext =
+                createEnumerator(
+                        srcDir,
+                        dstDir,
+                        "earliest",
+                        new FileSourceState(Collections.emptySet()),
+                        extraConfig);
+        try {
+            enumeratorWithContext.enumerator.notifyCheckpointComplete(1L);
+
+            Assertions.assertFalse(
+                    Files.exists(expiredManagedFile),
+                    "retention should remove expired files created with SeaTunnel version suffix");
+            Assertions.assertTrue(
+                    Files.exists(expiredUnmanagedFile),
+                    "retention should not remove files without SeaTunnel version suffix");
+        } finally {
+            enumeratorWithContext.enumerator.close();
+        }
+    }
+
+    @Test
+    void testRetentionDeletesExpiredBackupFiles() throws Exception {
+        Path srcDir = Files.createDirectories(tempDir.resolve("src16"));
+        Path dstDir = Files.createDirectories(tempDir.resolve("dst16"));
+        Path backupDir = Files.createDirectories(tempDir.resolve("backup16"));
+        Path expiredFile = backupDir.resolve("expired.bin.v3_123456");
+        Files.write(expiredFile, "old".getBytes());
+        Files.setLastModifiedTime(
+                expiredFile, FileTime.fromMillis(System.currentTimeMillis() - 60_000));
+
+        Map<String, Object> extraConfig = new HashMap<>();
+        extraConfig.put(FileBaseSourceOptions.POST_SYNC_ACTION.key(), "backup");
+        extraConfig.put(FileBaseSourceOptions.BACKUP_PATH.key(), backupDir.toString());
+        extraConfig.put(FileBaseSourceOptions.RETENTION_MAX_AGE.key(), "1S");
+        extraConfig.put(FileBaseSourceOptions.RETENTION_CHECK_INTERVAL.key(), "1S");
+
+        EnumeratorWithContext enumeratorWithContext =
+                createEnumerator(
+                        srcDir,
+                        dstDir,
+                        "earliest",
+                        new FileSourceState(Collections.emptySet()),
+                        extraConfig);
+        try {
+            enumeratorWithContext.enumerator.notifyCheckpointComplete(1L);
+            Assertions.assertFalse(
+                    Files.exists(expiredFile), "retention should remove expired backup files");
+        } finally {
+            enumeratorWithContext.enumerator.close();
+        }
+    }
+
+    private ContinuousMultipleTableFileSourceSplitEnumerator createValidationEnumerator(
+            ReadonlyConfig readonlyConfig) {
         BaseFileSourceConfig baseFileSourceConfig = Mockito.mock(BaseFileSourceConfig.class);
         Mockito.when(baseFileSourceConfig.getBaseFileSourceConfig()).thenReturn(readonlyConfig);
         Mockito.when(baseFileSourceConfig.getHadoopConfig())
@@ -410,18 +1668,23 @@ class ContinuousMultipleTableFileSourceSplitEnumeratorTest {
 
         SourceSplitEnumerator.Context<FileSourceSplit> context =
                 Mockito.mock(SourceSplitEnumerator.Context.class);
+        Mockito.when(context.currentParallelism()).thenReturn(1);
 
-        FileConnectorException exception =
-                Assertions.assertThrows(
-                        FileConnectorException.class,
-                        () ->
-                                new ContinuousMultipleTableFileSourceSplitEnumerator(
-                                        context,
-                                        multipleTableFileSourceConfig,
-                                        new DefaultFileSplitStrategy()));
-        Assertions.assertTrue(
-                exception.getMessage().contains("scan_interval > 0"),
-                "continuous mode should require a positive scan_interval");
+        return new ContinuousMultipleTableFileSourceSplitEnumerator(
+                context, multipleTableFileSourceConfig, new DefaultFileSplitStrategy());
+    }
+
+    private Map<String, Object> baseContinuousConfig(Path srcDir, Path dstDir) {
+        Map<String, Object> config = new HashMap<>();
+        config.put(FileBaseSourceOptions.FILE_PATH.key(), srcDir.toString());
+        config.put(FileBaseSourceOptions.FILE_FORMAT_TYPE.key(), "binary");
+        config.put(FileBaseSourceOptions.DISCOVERY_MODE.key(), "continuous");
+        config.put(FileBaseSourceOptions.START_MODE.key(), "earliest");
+        config.put(FileBaseSourceOptions.SYNC_MODE.key(), "update");
+        config.put(FileBaseSourceOptions.TARGET_PATH.key(), dstDir.toString());
+        config.put(FileBaseSourceOptions.UPDATE_STRATEGY.key(), "distcp");
+        config.put(FileBaseSourceOptions.COMPARE_MODE.key(), "len_mtime");
+        return config;
     }
 
     @Test
@@ -503,24 +1766,30 @@ class ContinuousMultipleTableFileSourceSplitEnumeratorTest {
 
     private EnumeratorWithContext createEnumerator(
             Path srcDir, Path dstDir, boolean recursiveFileScan) throws IOException {
+        Map<String, Object> extraConfig = new HashMap<>();
+        extraConfig.put(FileBaseSourceOptions.RECURSIVE_FILE_SCAN.key(), recursiveFileScan);
         return createEnumerator(
                 srcDir,
                 dstDir,
                 "earliest",
                 new FileSourceState(Collections.emptySet()),
-                recursiveFileScan);
+                extraConfig);
     }
 
     private EnumeratorWithContext createEnumerator(Path srcDir, Path dstDir, String startMode)
             throws IOException {
         return createEnumerator(
-                srcDir, dstDir, startMode, new FileSourceState(Collections.emptySet()));
+                srcDir,
+                dstDir,
+                startMode,
+                new FileSourceState(Collections.emptySet()),
+                Collections.emptyMap());
     }
 
     private EnumeratorWithContext createEnumerator(
             Path srcDir, Path dstDir, String startMode, FileSourceState checkpointState)
             throws IOException {
-        return createEnumerator(srcDir, dstDir, startMode, checkpointState, null);
+        return createEnumerator(srcDir, dstDir, startMode, checkpointState, Collections.emptyMap());
     }
 
     private EnumeratorWithContext createEnumerator(
@@ -528,7 +1797,7 @@ class ContinuousMultipleTableFileSourceSplitEnumeratorTest {
             Path dstDir,
             String startMode,
             FileSourceState checkpointState,
-            Boolean recursiveFileScan)
+            Map<String, Object> extraConfig)
             throws IOException {
         Map<String, Object> config = new HashMap<>();
         config.put(FileBaseSourceOptions.FILE_PATH.key(), srcDir.toString());
@@ -539,8 +1808,8 @@ class ContinuousMultipleTableFileSourceSplitEnumeratorTest {
         config.put(FileBaseSourceOptions.TARGET_PATH.key(), dstDir.toString());
         config.put(FileBaseSourceOptions.UPDATE_STRATEGY.key(), "distcp");
         config.put(FileBaseSourceOptions.COMPARE_MODE.key(), "len_mtime");
-        if (recursiveFileScan != null) {
-            config.put(FileBaseSourceOptions.RECURSIVE_FILE_SCAN.key(), recursiveFileScan);
+        if (extraConfig != null && !extraConfig.isEmpty()) {
+            config.putAll(extraConfig);
         }
 
         ReadonlyConfig readonlyConfig = ReadonlyConfig.fromMap(config);
@@ -590,6 +1859,55 @@ class ContinuousMultipleTableFileSourceSplitEnumeratorTest {
                 .collect(Collectors.toList());
     }
 
+    private static FileSourceOperationState stageSinglePostSyncOperation(
+            EnumeratorWithContext enumeratorWithContext, long checkpointId) throws IOException {
+        enumeratorWithContext.enumerator.scanOnceForTest();
+        enumeratorWithContext.enumerator.handleSplitRequest(0);
+
+        @SuppressWarnings("unchecked")
+        ArgumentCaptor<List<FileSourceSplit>> splitsCaptor =
+                ArgumentCaptor.forClass((Class) List.class);
+        Mockito.verify(enumeratorWithContext.context)
+                .assignSplit(Mockito.eq(0), splitsCaptor.capture());
+        FileSourceSplit assigned = splitsCaptor.getValue().get(0);
+        enumeratorWithContext.enumerator.handleSourceEvent(
+                0,
+                new FileSplitFinishedEvent(
+                        assigned.splitId(),
+                        calculateFileFingerprint(
+                                java.nio.file.Paths.get(
+                                        new org.apache.hadoop.fs.Path(assigned.getFilePath())
+                                                .toUri()))));
+
+        return enumeratorWithContext
+                .enumerator
+                .snapshotState(checkpointId)
+                .getPendingOpsByCheckpoint()
+                .get(checkpointId)
+                .get(0);
+    }
+
+    private static String calculateFileFingerprint(Path filePath) throws IOException {
+        try {
+            MessageDigest digest = MessageDigest.getInstance("SHA-256");
+            digest.update(Files.readAllBytes(filePath));
+            return toHex(digest.digest());
+        } catch (NoSuchAlgorithmException e) {
+            throw new IOException("SHA-256 is not supported by this JVM", e);
+        }
+    }
+
+    private static String toHex(byte[] bytes) {
+        char[] digits = "0123456789abcdef".toCharArray();
+        char[] encoded = new char[bytes.length * 2];
+        for (int i = 0; i < bytes.length; i++) {
+            int current = bytes[i] & 0xff;
+            encoded[i * 2] = digits[current >>> 4];
+            encoded[i * 2 + 1] = digits[current & 0x0f];
+        }
+        return new String(encoded);
+    }
+
     private static final class EnumeratorWithContext {
         private final ContinuousMultipleTableFileSourceSplitEnumerator enumerator;
         private final SourceSplitEnumerator.Context<FileSourceSplit> context;
@@ -613,6 +1931,36 @@ class ContinuousMultipleTableFileSourceSplitEnumeratorTest {
         return ((Map<String, Object>) field.get(enumerator)).size();
     }
 
+    private static HadoopFileSystemProxy getTableScanContextFileSystem(
+            ContinuousMultipleTableFileSourceSplitEnumerator enumerator, String fieldName)
+            throws ReflectiveOperationException {
+        Field tableScanContextsField =
+                ContinuousMultipleTableFileSourceSplitEnumerator.class.getDeclaredField(
+                        "tableScanContexts");
+        tableScanContextsField.setAccessible(true);
+        List<?> tableScanContexts = (List<?>) tableScanContextsField.get(enumerator);
+        Object tableScanContext = tableScanContexts.get(0);
+        Field fileSystemField = tableScanContext.getClass().getDeclaredField(fieldName);
+        fileSystemField.setAccessible(true);
+        return (HadoopFileSystemProxy) fileSystemField.get(tableScanContext);
+    }
+
+    private static void setTableScanContextFileSystem(
+            ContinuousMultipleTableFileSourceSplitEnumerator enumerator,
+            String fieldName,
+            HadoopFileSystemProxy fileSystem)
+            throws ReflectiveOperationException {
+        Field tableScanContextsField =
+                ContinuousMultipleTableFileSourceSplitEnumerator.class.getDeclaredField(
+                        "tableScanContexts");
+        tableScanContextsField.setAccessible(true);
+        List<?> tableScanContexts = (List<?>) tableScanContextsField.get(enumerator);
+        Object tableScanContext = tableScanContexts.get(0);
+        Field fileSystemField = tableScanContext.getClass().getDeclaredField(fieldName);
+        fileSystemField.setAccessible(true);
+        fileSystemField.set(tableScanContext, fileSystem);
+    }
+
     private static class LocalConf extends HadoopConf {
         private static final String HDFS_IMPL = "org.apache.hadoop.fs.LocalFileSystem";
         private static final String SCHEMA = "file";
diff --git a/seatunnel-connectors-v2/connector-file/connector-file-ftp/src/main/java/org/apache/seatunnel/connectors/seatunnel/file/ftp/source/FtpFileSourceFactory.java b/seatunnel-connectors-v2/connector-file/connector-file-ftp/src/main/java/org/apache/seatunnel/connectors/seatunnel/file/ftp/source/FtpFileSourceFactory.java
index 34eff76c1c..aa17762e12 100644
--- a/seatunnel-connectors-v2/connector-file/connector-file-ftp/src/main/java/org/apache/seatunnel/connectors/seatunnel/file/ftp/source/FtpFileSourceFactory.java
+++ b/seatunnel-connectors-v2/connector-file/connector-file-ftp/src/main/java/org/apache/seatunnel/connectors/seatunnel/file/ftp/source/FtpFileSourceFactory.java
@@ -27,6 +27,7 @@ import org.apache.seatunnel.api.table.factory.TableSourceFactory;
 import org.apache.seatunnel.api.table.factory.TableSourceFactoryContext;
 import org.apache.seatunnel.connectors.seatunnel.file.config.FileBaseSourceOptions;
 import org.apache.seatunnel.connectors.seatunnel.file.config.FileFormat;
+import org.apache.seatunnel.connectors.seatunnel.file.config.FilePostSyncAction;
 import org.apache.seatunnel.connectors.seatunnel.file.config.FileSyncMode;
 import org.apache.seatunnel.connectors.seatunnel.file.config.FileSystemType;
 import org.apache.seatunnel.connectors.seatunnel.file.ftp.config.FtpFileSourceOptions;
@@ -120,10 +121,19 @@ public class FtpFileSourceFactory implements TableSourceFactory {
                         FileBaseSourceOptions.COMPARE_MODE,
                         FileBaseSourceOptions.UPDATE_COMPARE_PARALLELISM,
                         FileBaseSourceOptions.UPDATE_COMPARE_BULK_THRESHOLD)
+                .optional(
+                        FileBaseSourceOptions.POST_SYNC_ACTION,
+                        FileBaseSourceOptions.BACKUP_PATH,
+                        FileBaseSourceOptions.RETENTION_MAX_AGE,
+                        FileBaseSourceOptions.RETENTION_CHECK_INTERVAL)
                 .conditional(
                         FileBaseSourceOptions.SYNC_MODE,
                         FileSyncMode.UPDATE,
                         FileBaseSourceOptions.TARGET_PATH)
+                .conditional(
+                        FileBaseSourceOptions.POST_SYNC_ACTION,
+                        FilePostSyncAction.BACKUP,
+                        FileBaseSourceOptions.BACKUP_PATH)
                 .optional(FileBaseSourceOptions.RECURSIVE_FILE_SCAN)
                 .build();
     }
diff --git a/seatunnel-connectors-v2/connector-file/connector-file-ftp/src/main/java/org/apache/seatunnel/connectors/seatunnel/file/ftp/system/SeaTunnelFTPFileSystem.java b/seatunnel-connectors-v2/connector-file/connector-file-ftp/src/main/java/org/apache/seatunnel/connectors/seatunnel/file/ftp/system/SeaTunnelFTPFileSystem.java
index 095d8f13b3..f5cb9bfaf0 100644
--- a/seatunnel-connectors-v2/connector-file/connector-file-ftp/src/main/java/org/apache/seatunnel/connectors/seatunnel/file/ftp/system/SeaTunnelFTPFileSystem.java
+++ b/seatunnel-connectors-v2/connector-file/connector-file-ftp/src/main/java/org/apache/seatunnel/connectors/seatunnel/file/ftp/system/SeaTunnelFTPFileSystem.java
@@ -833,8 +833,8 @@ public class SeaTunnelFTPFileSystem extends FileSystem implements StreamingFileS
             throw new IOException(
                     "Cannot rename " + absoluteSrc + " under itself" + " : " + absoluteDst);
         }
-        String from = absoluteSrc.toString();
-        String to = absoluteDst.toString();
+        String from = absoluteSrc.toUri().getPath();
+        String to = absoluteDst.toUri().getPath();
         return client.rename(from, to);
     }
 
diff --git a/seatunnel-connectors-v2/connector-file/connector-file-ftp/src/test/java/org/apache/seatunnel/connectors/seatunnel/file/ftp/FtpFileFactoryTest.java b/seatunnel-connectors-v2/connector-file/connector-file-ftp/src/test/java/org/apache/seatunnel/connectors/seatunnel/file/ftp/FtpFileFactoryTest.java
index 9fb0d9eb1e..82c3229843 100644
--- a/seatunnel-connectors-v2/connector-file/connector-file-ftp/src/test/java/org/apache/seatunnel/connectors/seatunnel/file/ftp/FtpFileFactoryTest.java
+++ b/seatunnel-connectors-v2/connector-file/connector-file-ftp/src/test/java/org/apache/seatunnel/connectors/seatunnel/file/ftp/FtpFileFactoryTest.java
@@ -17,17 +17,21 @@
 
 package org.apache.seatunnel.connectors.seatunnel.file.ftp;
 
-import org.apache.seatunnel.api.configuration.util.Expression;
+import org.apache.seatunnel.api.configuration.ReadonlyConfig;
+import org.apache.seatunnel.api.configuration.util.ConfigValidator;
 import org.apache.seatunnel.api.configuration.util.OptionRule;
-import org.apache.seatunnel.api.configuration.util.RequiredOption;
+import org.apache.seatunnel.api.configuration.util.OptionValidationException;
+import org.apache.seatunnel.connectors.seatunnel.file.config.FileBaseOptions;
 import org.apache.seatunnel.connectors.seatunnel.file.config.FileBaseSourceOptions;
-import org.apache.seatunnel.connectors.seatunnel.file.config.FileSyncMode;
 import org.apache.seatunnel.connectors.seatunnel.file.ftp.sink.FtpFileSinkFactory;
 import org.apache.seatunnel.connectors.seatunnel.file.ftp.source.FtpFileSourceFactory;
 
 import org.junit.jupiter.api.Assertions;
 import org.junit.jupiter.api.Test;
 
+import java.util.HashMap;
+import java.util.Map;
+
 class FtpFileFactoryTest {
 
     @Test
@@ -56,18 +60,61 @@ class FtpFileFactoryTest {
                 optionRule.getOptionalOptions().contains(FileBaseSourceOptions.SCAN_INTERVAL));
         Assertions.assertTrue(
                 optionRule.getOptionalOptions().contains(FileBaseSourceOptions.START_MODE));
-
-        Expression expectExpression =
-                Expression.of(FileBaseSourceOptions.SYNC_MODE, FileSyncMode.UPDATE);
         Assertions.assertTrue(
-                optionRule.getRequiredOptions().stream()
-                        .filter(RequiredOption.ConditionalRequiredOptions.class::isInstance)
-                        .map(RequiredOption.ConditionalRequiredOptions.class::cast)
-                        .filter(
-                                required ->
-                                        required.getOptions()
-                                                .contains(FileBaseSourceOptions.TARGET_PATH))
-                        .anyMatch(required -> expectExpression.equals(required.getExpression())));
+                optionRule.getOptionalOptions().contains(FileBaseSourceOptions.POST_SYNC_ACTION));
+        Assertions.assertTrue(
+                optionRule.getOptionalOptions().contains(FileBaseSourceOptions.BACKUP_PATH));
+        Assertions.assertTrue(
+                optionRule.getOptionalOptions().contains(FileBaseSourceOptions.RETENTION_MAX_AGE));
+        Assertions.assertTrue(
+                optionRule
+                        .getOptionalOptions()
+                        .contains(FileBaseSourceOptions.RETENTION_CHECK_INTERVAL));
+
         Assertions.assertNotNull((new FtpFileSinkFactory()).optionRule());
     }
+
+    @Test
+    void syncUpdateRequiresTargetPath() {
+        OptionRule optionRule = (new FtpFileSourceFactory()).optionRule();
+        Map<String, Object> config = sourceConfig();
+        config.put(FileBaseSourceOptions.SYNC_MODE.key(), "update");
+
+        Assertions.assertThrows(
+                OptionValidationException.class, () -> validate(config, optionRule));
+
+        config.put(FileBaseSourceOptions.TARGET_PATH.key(), "/target");
+        Assertions.assertDoesNotThrow(() -> validate(config, optionRule));
+    }
+
+    @Test
+    void postSyncActionValidation() {
+        OptionRule optionRule = (new FtpFileSourceFactory()).optionRule();
+        Map<String, Object> noneConfig = sourceConfig();
+        noneConfig.put(FileBaseSourceOptions.POST_SYNC_ACTION.key(), "none");
+        Assertions.assertDoesNotThrow(() -> validate(noneConfig, optionRule));
+
+        noneConfig.put(FileBaseSourceOptions.BACKUP_PATH.key(), "/backup");
+        noneConfig.put(FileBaseSourceOptions.RETENTION_MAX_AGE.key(), "7D");
+        noneConfig.put(FileBaseSourceOptions.RETENTION_CHECK_INTERVAL.key(), "1H");
+        Assertions.assertDoesNotThrow(() -> validate(noneConfig, optionRule));
+
+        Map<String, Object> backupConfig = sourceConfig();
+        backupConfig.put(FileBaseSourceOptions.POST_SYNC_ACTION.key(), "backup");
+        Assertions.assertThrows(
+                OptionValidationException.class, () -> validate(backupConfig, optionRule));
+
+        backupConfig.put(FileBaseSourceOptions.BACKUP_PATH.key(), "/backup");
+        Assertions.assertDoesNotThrow(() -> validate(backupConfig, optionRule));
+    }
+
+    private static Map<String, Object> sourceConfig() {
+        Map<String, Object> config = new HashMap<>();
+        config.put(FileBaseOptions.FILE_PATH.key(), "/source");
+        return config;
+    }
+
+    private static void validate(Map<String, Object> config, OptionRule optionRule) {
+        ConfigValidator.of(ReadonlyConfig.fromMap(config)).validate(optionRule);
+    }
 }
diff --git a/seatunnel-connectors-v2/connector-file/connector-file-hadoop/src/main/java/org/apache/seatunnel/connectors/seatunnel/file/hdfs/source/HdfsFileSourceFactory.java b/seatunnel-connectors-v2/connector-file/connector-file-hadoop/src/main/java/org/apache/seatunnel/connectors/seatunnel/file/hdfs/source/HdfsFileSourceFactory.java
index 111941c248..b99417be7a 100644
--- a/seatunnel-connectors-v2/connector-file/connector-file-hadoop/src/main/java/org/apache/seatunnel/connectors/seatunnel/file/hdfs/source/HdfsFileSourceFactory.java
+++ b/seatunnel-connectors-v2/connector-file/connector-file-hadoop/src/main/java/org/apache/seatunnel/connectors/seatunnel/file/hdfs/source/HdfsFileSourceFactory.java
@@ -27,6 +27,7 @@ import org.apache.seatunnel.api.table.factory.TableSourceFactory;
 import org.apache.seatunnel.api.table.factory.TableSourceFactoryContext;
 import org.apache.seatunnel.connectors.seatunnel.file.config.FileBaseSourceOptions;
 import org.apache.seatunnel.connectors.seatunnel.file.config.FileFormat;
+import org.apache.seatunnel.connectors.seatunnel.file.config.FilePostSyncAction;
 import org.apache.seatunnel.connectors.seatunnel.file.config.FileSyncMode;
 import org.apache.seatunnel.connectors.seatunnel.file.config.FileSystemType;
 import org.apache.seatunnel.connectors.seatunnel.file.hdfs.config.HdfsFileSourceOptions;
@@ -124,10 +125,19 @@ public class HdfsFileSourceFactory implements TableSourceFactory {
                         HdfsFileSourceOptions.COMPARE_MODE,
                         HdfsFileSourceOptions.UPDATE_COMPARE_PARALLELISM,
                         HdfsFileSourceOptions.UPDATE_COMPARE_BULK_THRESHOLD)
+                .optional(
+                        HdfsFileSourceOptions.POST_SYNC_ACTION,
+                        HdfsFileSourceOptions.BACKUP_PATH,
+                        HdfsFileSourceOptions.RETENTION_MAX_AGE,
+                        HdfsFileSourceOptions.RETENTION_CHECK_INTERVAL)
                 .conditional(
                         HdfsFileSourceOptions.SYNC_MODE,
                         FileSyncMode.UPDATE,
                         HdfsFileSourceOptions.TARGET_PATH)
+                .conditional(
+                        HdfsFileSourceOptions.POST_SYNC_ACTION,
+                        FilePostSyncAction.BACKUP,
+                        HdfsFileSourceOptions.BACKUP_PATH)
                 .optional(HdfsFileSourceOptions.HDFS_SITE_PATH)
                 .optional(HdfsFileSourceOptions.KERBEROS_PRINCIPAL)
                 .optional(HdfsFileSourceOptions.KERBEROS_KEYTAB_PATH)
diff --git a/seatunnel-connectors-v2/connector-file/connector-file-hadoop/src/test/java/org/apache/seatunnel/connectors/seatunnel/file/hdfs/HdfsFileFactoryTest.java b/seatunnel-connectors-v2/connector-file/connector-file-hadoop/src/test/java/org/apache/seatunnel/connectors/seatunnel/file/hdfs/HdfsFileFactoryTest.java
index 5a57498627..1d9ed3c988 100644
--- a/seatunnel-connectors-v2/connector-file/connector-file-hadoop/src/test/java/org/apache/seatunnel/connectors/seatunnel/file/hdfs/HdfsFileFactoryTest.java
+++ b/seatunnel-connectors-v2/connector-file/connector-file-hadoop/src/test/java/org/apache/seatunnel/connectors/seatunnel/file/hdfs/HdfsFileFactoryTest.java
@@ -17,7 +17,11 @@
 
 package org.apache.seatunnel.connectors.seatunnel.file.hdfs;
 
+import org.apache.seatunnel.api.configuration.ReadonlyConfig;
+import org.apache.seatunnel.api.configuration.util.ConfigValidator;
 import org.apache.seatunnel.api.configuration.util.OptionRule;
+import org.apache.seatunnel.api.configuration.util.OptionValidationException;
+import org.apache.seatunnel.connectors.seatunnel.file.config.FileBaseOptions;
 import org.apache.seatunnel.connectors.seatunnel.file.config.FileBaseSourceOptions;
 import org.apache.seatunnel.connectors.seatunnel.file.hdfs.sink.HdfsFileSinkFactory;
 import org.apache.seatunnel.connectors.seatunnel.file.hdfs.source.HdfsFileSourceFactory;
@@ -25,6 +29,9 @@ import org.apache.seatunnel.connectors.seatunnel.file.hdfs.source.HdfsFileSource
 import org.junit.jupiter.api.Assertions;
 import org.junit.jupiter.api.Test;
 
+import java.util.HashMap;
+import java.util.Map;
+
 class HdfsFileFactoryTest {
 
     @Test
@@ -37,6 +44,16 @@ class HdfsFileFactoryTest {
                 optionRule.getOptionalOptions().contains(FileBaseSourceOptions.SCAN_INTERVAL));
         Assertions.assertTrue(
                 optionRule.getOptionalOptions().contains(FileBaseSourceOptions.START_MODE));
+        Assertions.assertTrue(
+                optionRule.getOptionalOptions().contains(FileBaseSourceOptions.POST_SYNC_ACTION));
+        Assertions.assertTrue(
+                optionRule.getOptionalOptions().contains(FileBaseSourceOptions.BACKUP_PATH));
+        Assertions.assertTrue(
+                optionRule.getOptionalOptions().contains(FileBaseSourceOptions.RETENTION_MAX_AGE));
+        Assertions.assertTrue(
+                optionRule
+                        .getOptionalOptions()
+                        .contains(FileBaseSourceOptions.RETENTION_CHECK_INTERVAL));
         Assertions.assertTrue(
                 optionRule
                         .getOptionalOptions()
@@ -47,4 +64,48 @@ class HdfsFileFactoryTest {
                         .contains(FileBaseSourceOptions.UPDATE_COMPARE_BULK_THRESHOLD));
         Assertions.assertNotNull((new HdfsFileSinkFactory()).optionRule());
     }
+
+    @Test
+    void syncUpdateRequiresTargetPath() {
+        OptionRule optionRule = (new HdfsFileSourceFactory()).optionRule();
+        Map<String, Object> config = sourceConfig();
+        config.put(FileBaseSourceOptions.SYNC_MODE.key(), "update");
+
+        Assertions.assertThrows(
+                OptionValidationException.class, () -> validate(config, optionRule));
+
+        config.put(FileBaseSourceOptions.TARGET_PATH.key(), "/target");
+        Assertions.assertDoesNotThrow(() -> validate(config, optionRule));
+    }
+
+    @Test
+    void postSyncActionValidation() {
+        OptionRule optionRule = (new HdfsFileSourceFactory()).optionRule();
+        Map<String, Object> noneConfig = sourceConfig();
+        noneConfig.put(FileBaseSourceOptions.POST_SYNC_ACTION.key(), "none");
+        Assertions.assertDoesNotThrow(() -> validate(noneConfig, optionRule));
+
+        noneConfig.put(FileBaseSourceOptions.BACKUP_PATH.key(), "/backup");
+        noneConfig.put(FileBaseSourceOptions.RETENTION_MAX_AGE.key(), "7D");
+        noneConfig.put(FileBaseSourceOptions.RETENTION_CHECK_INTERVAL.key(), "1H");
+        Assertions.assertDoesNotThrow(() -> validate(noneConfig, optionRule));
+
+        Map<String, Object> backupConfig = sourceConfig();
+        backupConfig.put(FileBaseSourceOptions.POST_SYNC_ACTION.key(), "backup");
+        Assertions.assertThrows(
+                OptionValidationException.class, () -> validate(backupConfig, optionRule));
+
+        backupConfig.put(FileBaseSourceOptions.BACKUP_PATH.key(), "/backup");
+        Assertions.assertDoesNotThrow(() -> validate(backupConfig, optionRule));
+    }
+
+    private static Map<String, Object> sourceConfig() {
+        Map<String, Object> config = new HashMap<>();
+        config.put(FileBaseOptions.FILE_PATH.key(), "/source");
+        return config;
+    }
+
+    private static void validate(Map<String, Object> config, OptionRule optionRule) {
+        ConfigValidator.of(ReadonlyConfig.fromMap(config)).validate(optionRule);
+    }
 }
diff --git a/seatunnel-connectors-v2/connector-file/connector-file-local/src/main/java/org/apache/seatunnel/connectors/seatunnel/file/local/source/LocalFileSourceFactory.java b/seatunnel-connectors-v2/connector-file/connector-file-local/src/main/java/org/apache/seatunnel/connectors/seatunnel/file/local/source/LocalFileSourceFactory.java
index fd7d613913..0d340ec5c7 100644
--- a/seatunnel-connectors-v2/connector-file/connector-file-local/src/main/java/org/apache/seatunnel/connectors/seatunnel/file/local/source/LocalFileSourceFactory.java
+++ b/seatunnel-connectors-v2/connector-file/connector-file-local/src/main/java/org/apache/seatunnel/connectors/seatunnel/file/local/source/LocalFileSourceFactory.java
@@ -29,6 +29,7 @@ import org.apache.seatunnel.connectors.seatunnel.file.config.FileBaseOptions;
 import org.apache.seatunnel.connectors.seatunnel.file.config.FileBaseSinkOptions;
 import org.apache.seatunnel.connectors.seatunnel.file.config.FileBaseSourceOptions;
 import org.apache.seatunnel.connectors.seatunnel.file.config.FileFormat;
+import org.apache.seatunnel.connectors.seatunnel.file.config.FilePostSyncAction;
 import org.apache.seatunnel.connectors.seatunnel.file.config.FileSyncMode;
 import org.apache.seatunnel.connectors.seatunnel.file.config.FileSystemType;
 import org.apache.seatunnel.connectors.seatunnel.file.local.config.LocalFileSourceOptions;
@@ -127,10 +128,19 @@ public class LocalFileSourceFactory implements TableSourceFactory {
                         FileBaseSourceOptions.COMPARE_MODE,
                         FileBaseSourceOptions.UPDATE_COMPARE_PARALLELISM,
                         FileBaseSourceOptions.UPDATE_COMPARE_BULK_THRESHOLD)
+                .optional(
+                        FileBaseSourceOptions.POST_SYNC_ACTION,
+                        FileBaseSourceOptions.BACKUP_PATH,
+                        FileBaseSourceOptions.RETENTION_MAX_AGE,
+                        FileBaseSourceOptions.RETENTION_CHECK_INTERVAL)
                 .conditional(
                         FileBaseSourceOptions.SYNC_MODE,
                         FileSyncMode.UPDATE,
                         FileBaseSourceOptions.TARGET_PATH)
+                .conditional(
+                        FileBaseSourceOptions.POST_SYNC_ACTION,
+                        FilePostSyncAction.BACKUP,
+                        FileBaseSourceOptions.BACKUP_PATH)
                 .optional(FileBaseSourceOptions.RECURSIVE_FILE_SCAN)
                 .build();
     }
diff --git a/seatunnel-connectors-v2/connector-file/connector-file-local/src/test/java/org/apache/seatunnel/connectors/seatunnel/file/local/LocalFileFactoryTest.java b/seatunnel-connectors-v2/connector-file/connector-file-local/src/test/java/org/apache/seatunnel/connectors/seatunnel/file/local/LocalFileFactoryTest.java
index c9f63b686b..c4c40323f9 100644
--- a/seatunnel-connectors-v2/connector-file/connector-file-local/src/test/java/org/apache/seatunnel/connectors/seatunnel/file/local/LocalFileFactoryTest.java
+++ b/seatunnel-connectors-v2/connector-file/connector-file-local/src/test/java/org/apache/seatunnel/connectors/seatunnel/file/local/LocalFileFactoryTest.java
@@ -17,17 +17,22 @@
 
 package org.apache.seatunnel.connectors.seatunnel.file.local;
 
-import org.apache.seatunnel.api.configuration.util.Expression;
+import org.apache.seatunnel.api.configuration.ReadonlyConfig;
+import org.apache.seatunnel.api.configuration.util.ConfigValidator;
 import org.apache.seatunnel.api.configuration.util.OptionRule;
+import org.apache.seatunnel.api.configuration.util.OptionValidationException;
 import org.apache.seatunnel.api.configuration.util.RequiredOption;
+import org.apache.seatunnel.connectors.seatunnel.file.config.FileBaseOptions;
 import org.apache.seatunnel.connectors.seatunnel.file.config.FileBaseSourceOptions;
-import org.apache.seatunnel.connectors.seatunnel.file.config.FileSyncMode;
 import org.apache.seatunnel.connectors.seatunnel.file.local.sink.LocalFileSinkFactory;
 import org.apache.seatunnel.connectors.seatunnel.file.local.source.LocalFileSourceFactory;
 
 import org.junit.jupiter.api.Assertions;
 import org.junit.jupiter.api.Test;
 
+import java.util.HashMap;
+import java.util.Map;
+
 class LocalFileFactoryTest {
 
     @Test
@@ -57,6 +62,16 @@ class LocalFileFactoryTest {
                 optionRule.getOptionalOptions().contains(FileBaseSourceOptions.SCAN_INTERVAL));
         Assertions.assertTrue(
                 optionRule.getOptionalOptions().contains(FileBaseSourceOptions.START_MODE));
+        Assertions.assertTrue(
+                optionRule.getOptionalOptions().contains(FileBaseSourceOptions.POST_SYNC_ACTION));
+        Assertions.assertTrue(
+                optionRule.getOptionalOptions().contains(FileBaseSourceOptions.BACKUP_PATH));
+        Assertions.assertTrue(
+                optionRule.getOptionalOptions().contains(FileBaseSourceOptions.RETENTION_MAX_AGE));
+        Assertions.assertTrue(
+                optionRule
+                        .getOptionalOptions()
+                        .contains(FileBaseSourceOptions.RETENTION_CHECK_INTERVAL));
         Assertions.assertTrue(
                 optionRule.getRequiredOptions().stream()
                         .filter(RequiredOption.ConditionalRequiredOptions.class::isInstance)
@@ -67,17 +82,49 @@ class LocalFileFactoryTest {
                                                 .contains(
                                                         FileBaseSourceOptions
                                                                 .MARKDOWN_RAG_METADATA_ENABLED)));
+    }
 
-        Expression expectExpression =
-                Expression.of(FileBaseSourceOptions.SYNC_MODE, FileSyncMode.UPDATE);
-        Assertions.assertTrue(
-                optionRule.getRequiredOptions().stream()
-                        .filter(RequiredOption.ConditionalRequiredOptions.class::isInstance)
-                        .map(RequiredOption.ConditionalRequiredOptions.class::cast)
-                        .filter(
-                                required ->
-                                        required.getOptions()
-                                                .contains(FileBaseSourceOptions.TARGET_PATH))
-                        .anyMatch(required -> expectExpression.equals(required.getExpression())));
+    @Test
+    void syncUpdateRequiresTargetPath() {
+        OptionRule optionRule = (new LocalFileSourceFactory()).optionRule();
+        Map<String, Object> config = sourceConfig();
+        config.put(FileBaseSourceOptions.SYNC_MODE.key(), "update");
+
+        Assertions.assertThrows(
+                OptionValidationException.class, () -> validate(config, optionRule));
+
+        config.put(FileBaseSourceOptions.TARGET_PATH.key(), "/target");
+        Assertions.assertDoesNotThrow(() -> validate(config, optionRule));
+    }
+
+    @Test
+    void postSyncActionValidation() {
+        OptionRule optionRule = (new LocalFileSourceFactory()).optionRule();
+        Map<String, Object> noneConfig = sourceConfig();
+        noneConfig.put(FileBaseSourceOptions.POST_SYNC_ACTION.key(), "none");
+        Assertions.assertDoesNotThrow(() -> validate(noneConfig, optionRule));
+
+        noneConfig.put(FileBaseSourceOptions.BACKUP_PATH.key(), "/backup");
+        noneConfig.put(FileBaseSourceOptions.RETENTION_MAX_AGE.key(), "7D");
+        noneConfig.put(FileBaseSourceOptions.RETENTION_CHECK_INTERVAL.key(), "1H");
+        Assertions.assertDoesNotThrow(() -> validate(noneConfig, optionRule));
+
+        Map<String, Object> backupConfig = sourceConfig();
+        backupConfig.put(FileBaseSourceOptions.POST_SYNC_ACTION.key(), "backup");
+        Assertions.assertThrows(
+                OptionValidationException.class, () -> validate(backupConfig, optionRule));
+
+        backupConfig.put(FileBaseSourceOptions.BACKUP_PATH.key(), "/backup");
+        Assertions.assertDoesNotThrow(() -> validate(backupConfig, optionRule));
+    }
+
+    private static Map<String, Object> sourceConfig() {
+        Map<String, Object> config = new HashMap<>();
+        config.put(FileBaseOptions.FILE_PATH.key(), "/source");
+        return config;
+    }
+
+    private static void validate(Map<String, Object> config, OptionRule optionRule) {
+        ConfigValidator.of(ReadonlyConfig.fromMap(config)).validate(optionRule);
     }
 }
diff --git a/seatunnel-connectors-v2/connector-file/connector-file-sftp/src/main/java/org/apache/seatunnel/connectors/seatunnel/file/sftp/source/SftpFileSourceFactory.java b/seatunnel-connectors-v2/connector-file/connector-file-sftp/src/main/java/org/apache/seatunnel/connectors/seatunnel/file/sftp/source/SftpFileSourceFactory.java
index ca962549f6..b1fd263c4a 100644
--- a/seatunnel-connectors-v2/connector-file/connector-file-sftp/src/main/java/org/apache/seatunnel/connectors/seatunnel/file/sftp/source/SftpFileSourceFactory.java
+++ b/seatunnel-connectors-v2/connector-file/connector-file-sftp/src/main/java/org/apache/seatunnel/connectors/seatunnel/file/sftp/source/SftpFileSourceFactory.java
@@ -27,6 +27,7 @@ import org.apache.seatunnel.api.table.factory.TableSourceFactory;
 import org.apache.seatunnel.api.table.factory.TableSourceFactoryContext;
 import org.apache.seatunnel.connectors.seatunnel.file.config.FileBaseSourceOptions;
 import org.apache.seatunnel.connectors.seatunnel.file.config.FileFormat;
+import org.apache.seatunnel.connectors.seatunnel.file.config.FilePostSyncAction;
 import org.apache.seatunnel.connectors.seatunnel.file.config.FileSyncMode;
 import org.apache.seatunnel.connectors.seatunnel.file.config.FileSystemType;
 import org.apache.seatunnel.connectors.seatunnel.file.sftp.config.SftpFileSourceOptions;
@@ -108,10 +109,19 @@ public class SftpFileSourceFactory implements TableSourceFactory {
                         FileBaseSourceOptions.COMPARE_MODE,
                         FileBaseSourceOptions.UPDATE_COMPARE_PARALLELISM,
                         FileBaseSourceOptions.UPDATE_COMPARE_BULK_THRESHOLD)
+                .optional(
+                        FileBaseSourceOptions.POST_SYNC_ACTION,
+                        FileBaseSourceOptions.BACKUP_PATH,
+                        FileBaseSourceOptions.RETENTION_MAX_AGE,
+                        FileBaseSourceOptions.RETENTION_CHECK_INTERVAL)
                 .conditional(
                         FileBaseSourceOptions.SYNC_MODE,
                         FileSyncMode.UPDATE,
                         FileBaseSourceOptions.TARGET_PATH)
+                .conditional(
+                        FileBaseSourceOptions.POST_SYNC_ACTION,
+                        FilePostSyncAction.BACKUP,
+                        FileBaseSourceOptions.BACKUP_PATH)
                 .optional(FileBaseSourceOptions.RECURSIVE_FILE_SCAN)
                 .build();
     }
diff --git a/seatunnel-connectors-v2/connector-file/connector-file-sftp/src/main/java/org/apache/seatunnel/connectors/seatunnel/file/sftp/system/SFTPConnectionPool.java b/seatunnel-connectors-v2/connector-file/connector-file-sftp/src/main/java/org/apache/seatunnel/connectors/seatunnel/file/sftp/system/SFTPConnectionPool.java
index 677d56c9e9..68b7466786 100644
--- a/seatunnel-connectors-v2/connector-file/connector-file-sftp/src/main/java/org/apache/seatunnel/connectors/seatunnel/file/sftp/system/SFTPConnectionPool.java
+++ b/seatunnel-connectors-v2/connector-file/connector-file-sftp/src/main/java/org/apache/seatunnel/connectors/seatunnel/file/sftp/system/SFTPConnectionPool.java
@@ -47,6 +47,7 @@ public class SFTPConnectionPool {
             new HashMap<ConnectionInfo, HashSet<ChannelSftp>>();
     private HashMap<ChannelSftp, ConnectionInfo> con2infoMap =
             new HashMap<ChannelSftp, ConnectionInfo>();
+    private HashMap<ChannelSftp, Session> con2sessionMap = new HashMap<ChannelSftp, Session>();
 
     SFTPConnectionPool(int maxConnection, int liveConnectionCount) {
         this.maxConnection = maxConnection;
@@ -93,9 +94,35 @@ public class SFTPConnectionPool {
         return true;
     }
 
+    /** Register a newly opened connection unless shutdown won the race. */
+    boolean registerConnection(ChannelSftp channel, ConnectionInfo info) throws IOException {
+        try {
+            return registerConnection(channel, channel.getSession(), info);
+        } catch (JSchException e) {
+            closeChannel(channel, null);
+            throw new IOException(StringUtils.stringifyException(e));
+        }
+    }
+
+    /** Register the channel together with the session captured when the connection was opened. */
+    private boolean registerConnection(ChannelSftp channel, Session session, ConnectionInfo info)
+            throws IOException {
+        synchronized (this) {
+            if (con2infoMap != null) {
+                con2infoMap.put(channel, info);
+                con2sessionMap.put(channel, session);
+                liveConnectionCount++;
+                return true;
+            }
+        }
+        closeChannel(channel, session);
+        return false;
+    }
+
     /** Shutdown the connection pool and close all open connections. */
     void shutdown() {
         Map<ChannelSftp, ConnectionInfo> connectionsToClose;
+        Map<ChannelSftp, Session> sessionsToClose;
         synchronized (this) {
             if (this.con2infoMap == null) {
                 return; // already shutdown in case it is called
@@ -104,15 +131,17 @@ public class SFTPConnectionPool {
 
             // Shutdown must close every tracked connection regardless of live-count drift.
             connectionsToClose = new HashMap<ChannelSftp, ConnectionInfo>(con2infoMap);
+            sessionsToClose = new HashMap<ChannelSftp, Session>(con2sessionMap);
             this.maxConnection = 0;
             this.liveConnectionCount = 0;
             this.idleConnections = null;
             this.con2infoMap = null;
+            this.con2sessionMap = null;
         }
 
         for (Map.Entry<ChannelSftp, ConnectionInfo> entry : connectionsToClose.entrySet()) {
             try {
-                closeChannel(entry.getKey());
+                closeChannel(entry.getKey(), sessionsToClose.get(entry.getKey()));
             } catch (IOException ioe) {
                 LOG.error(
                         "Error encountered while closing connection to "
@@ -140,8 +169,8 @@ public class SFTPConnectionPool {
             if (channel.isConnected()) {
                 return channel;
             } else {
-                removeTrackedChannel(channel);
-                closeChannel(channel);
+                Session trackedSession = removeTrackedChannel(channel);
+                closeChannel(channel, trackedSession);
                 channel = null;
             }
         }
@@ -181,14 +210,14 @@ public class SFTPConnectionPool {
             channel = (ChannelSftp) session.openChannel("sftp");
             channel.connect();
 
-            synchronized (this) {
-                con2infoMap.put(channel, info);
-                liveConnectionCount++;
+            if (!registerConnection(channel, session, info)) {
+                throw new IOException("SFTP connection pool has been closed.");
             }
 
             return channel;
 
         } catch (JSchException e) {
+            closeConnectionResources(channel, session);
             throw new IOException(StringUtils.stringifyException(e));
         }
     }
@@ -197,19 +226,21 @@ public class SFTPConnectionPool {
         if (channel != null) {
             // close connection if too many active connections
             boolean closeConnection = false;
+            Session trackedSession = null;
             synchronized (this) {
                 if (con2infoMap == null || !con2infoMap.containsKey(channel)) {
                     closeConnection = true;
                 } else if (liveConnectionCount > maxConnection) {
                     --liveConnectionCount;
                     con2infoMap.remove(channel);
+                    trackedSession = con2sessionMap.remove(channel);
                     closeConnection = true;
                 }
             }
             if (closeConnection) {
-                closeChannel(channel);
+                closeChannel(channel, trackedSession);
             } else if (!returnToPool(channel)) {
-                closeChannel(channel);
+                closeChannel(channel, null);
             }
         }
     }
@@ -218,11 +249,12 @@ public class SFTPConnectionPool {
      * Remove bookkeeping for a channel that can no longer be reused before we create a replacement
      * connection.
      */
-    synchronized void removeTrackedChannel(ChannelSftp channel) {
+    synchronized Session removeTrackedChannel(ChannelSftp channel) {
         if (con2infoMap == null) {
-            return;
+            return null;
         }
         ConnectionInfo info = con2infoMap.remove(channel);
+        Session session = con2sessionMap.remove(channel);
         if (info != null) {
             Set<ChannelSftp> cons = idleConnections.get(info);
             if (cons != null) {
@@ -231,24 +263,40 @@ public class SFTPConnectionPool {
                     idleConnections.remove(info);
                 }
             }
+            if (liveConnectionCount > 0) {
+                liveConnectionCount--;
+            }
         }
-        if (liveConnectionCount > 0) {
-            liveConnectionCount--;
-        }
+        return session;
     }
 
-    /** Close both the SFTP channel and its backing SSH session when they are still open. */
-    private void closeChannel(ChannelSftp channel) throws IOException {
-        try {
-            Session session = channel.getSession();
-            if (channel.isConnected()) {
-                channel.disconnect();
-            }
-            if (session != null && session.isConnected()) {
-                session.disconnect();
+    /**
+     * Close both connection resources, preferring the session captured before the channel can lose
+     * its back-link during cancellation.
+     */
+    private void closeChannel(ChannelSftp channel, Session capturedSession) throws IOException {
+        JSchException sessionLookupFailure = null;
+        Session session = capturedSession;
+        if (session == null) {
+            try {
+                session = channel.getSession();
+            } catch (JSchException e) {
+                sessionLookupFailure = e;
             }
-        } catch (JSchException e) {
-            throw new IOException(StringUtils.stringifyException(e));
+        }
+        closeConnectionResources(channel, session);
+        if (sessionLookupFailure != null) {
+            throw new IOException(StringUtils.stringifyException(sessionLookupFailure));
+        }
+    }
+
+    /** Disconnect the SFTP channel and its SSH session when either has already been created. */
+    private void closeConnectionResources(ChannelSftp channel, Session session) {
+        if (channel != null && channel.isConnected()) {
+            channel.disconnect();
+        }
+        if (session != null && session.isConnected()) {
+            session.disconnect();
         }
     }
 
diff --git a/seatunnel-connectors-v2/connector-file/connector-file-sftp/src/main/java/org/apache/seatunnel/connectors/seatunnel/file/sftp/system/SFTPFileSystem.java b/seatunnel-connectors-v2/connector-file/connector-file-sftp/src/main/java/org/apache/seatunnel/connectors/seatunnel/file/sftp/system/SFTPFileSystem.java
index ec5093aed5..439f1795ca 100644
--- a/seatunnel-connectors-v2/connector-file/connector-file-sftp/src/main/java/org/apache/seatunnel/connectors/seatunnel/file/sftp/system/SFTPFileSystem.java
+++ b/seatunnel-connectors-v2/connector-file/connector-file-sftp/src/main/java/org/apache/seatunnel/connectors/seatunnel/file/sftp/system/SFTPFileSystem.java
@@ -481,30 +481,26 @@ public class SFTPFileSystem extends FileSystem implements StreamingFileSystem {
     @Override
     public FSDataInputStream open(Path f, int bufferSize) throws IOException {
         ChannelSftp channel = connect();
-        Path workDir;
-        try {
-            workDir = new Path(channel.pwd());
-        } catch (SftpException e) {
-            throw new IOException(e);
-        }
-        Path absolute = makeAbsolute(workDir, f);
-        FileStatus fileStat = getFileStatus(channel, absolute);
-        if (fileStat.isDirectory()) {
-            disconnect(channel);
-            throw new IOException(String.format(E_PATH_DIR, f));
-        }
-        InputStream is;
         try {
+            Path workDir = new Path(channel.pwd());
+            Path absolute = makeAbsolute(workDir, f);
+            FileStatus fileStat = getFileStatus(channel, absolute);
+            if (fileStat.isDirectory()) {
+                throw new IOException(String.format(E_PATH_DIR, f));
+            }
             // the path could be a symbolic link, so get the real path
             absolute = new Path("/", channel.realpath(absolute.toUri().getPath()));
 
-            is = channel.get(quote(absolute.toUri().getPath()));
-        } catch (SftpException e) {
+            InputStream is = channel.get(quote(absolute.toUri().getPath()));
+            return new FSDataInputStream(
+                    new SFTPInputStream(is, channel, connectionPool, statistics));
+        } catch (Exception e) {
+            disconnectAfterFailure(channel, e);
+            if (e instanceof IOException) {
+                throw (IOException) e;
+            }
             throw new IOException(e);
         }
-
-        FSDataInputStream fis = new FSDataInputStream(new SFTPInputStream(is, channel, statistics));
-        return fis;
     }
 
     /**
@@ -522,49 +518,50 @@ public class SFTPFileSystem extends FileSystem implements StreamingFileSystem {
             Progressable progress)
             throws IOException {
         final ChannelSftp client = connect();
-        Path workDir;
         try {
-            workDir = new Path(client.pwd());
-        } catch (SftpException e) {
-            throw new IOException(e);
-        }
-        Path absolute = makeAbsolute(workDir, f);
-        if (exists(client, f)) {
-            if (overwrite) {
-                delete(client, f, false);
-            } else {
-                disconnect(client);
-                throw new IOException(String.format(E_FILE_EXIST, f));
+            Path workDir = new Path(client.pwd());
+            Path absolute = makeAbsolute(workDir, f);
+            if (exists(client, f)) {
+                if (overwrite) {
+                    delete(client, f, false);
+                } else {
+                    throw new IOException(String.format(E_FILE_EXIST, f));
+                }
+            }
+            Path parent = absolute.getParent();
+            if (parent == null || !mkdirs(client, parent, FsPermission.getDefault())) {
+                parent = (parent == null) ? new Path("/") : parent;
+                throw new IOException(String.format(E_CREATE_DIR, parent));
             }
-        }
-        Path parent = absolute.getParent();
-        if (parent == null || !mkdirs(client, parent, FsPermission.getDefault())) {
-            parent = (parent == null) ? new Path("/") : parent;
-            disconnect(client);
-            throw new IOException(String.format(E_CREATE_DIR, parent));
-        }
-        OutputStream os;
-        try {
             final String previousCwd = client.pwd();
             client.cd(parent.toUri().getPath());
-            os = client.put(f.getName());
+            OutputStream os = client.put(f.getName());
             client.cd(previousCwd);
-        } catch (SftpException e) {
+            return new FSDataOutputStream(os, statistics) {
+                @Override
+                public void close() throws IOException {
+                    try {
+                        super.close();
+                    } finally {
+                        disconnect(client);
+                    }
+                }
+            };
+        } catch (Exception e) {
+            disconnectAfterFailure(client, e);
+            if (e instanceof IOException) {
+                throw (IOException) e;
+            }
             throw new IOException(e);
         }
-        FSDataOutputStream fos =
-                new FSDataOutputStream(os, statistics) {
-                    @Override
-                    public void close() throws IOException {
-                        try {
-                            super.close();
-                        } finally {
-                            disconnect(client);
-                        }
-                    }
-                };
+    }
 
-        return fos;
+    private void disconnectAfterFailure(ChannelSftp channel, Exception originalFailure) {
+        try {
+            disconnect(channel);
+        } catch (IOException disconnectFailure) {
+            originalFailure.addSuppressed(disconnectFailure);
+        }
     }
 
     @Override
diff --git a/seatunnel-connectors-v2/connector-file/connector-file-sftp/src/main/java/org/apache/seatunnel/connectors/seatunnel/file/sftp/system/SFTPInputStream.java b/seatunnel-connectors-v2/connector-file/connector-file-sftp/src/main/java/org/apache/seatunnel/connectors/seatunnel/file/sftp/system/SFTPInputStream.java
index a9cd9d4fb9..63c26270ad 100644
--- a/seatunnel-connectors-v2/connector-file/connector-file-sftp/src/main/java/org/apache/seatunnel/connectors/seatunnel/file/sftp/system/SFTPInputStream.java
+++ b/seatunnel-connectors-v2/connector-file/connector-file-sftp/src/main/java/org/apache/seatunnel/connectors/seatunnel/file/sftp/system/SFTPInputStream.java
@@ -19,11 +19,8 @@ package org.apache.seatunnel.connectors.seatunnel.file.sftp.system;
 
 import org.apache.hadoop.fs.FSInputStream;
 import org.apache.hadoop.fs.FileSystem;
-import org.apache.hadoop.util.StringUtils;
 
 import com.jcraft.jsch.ChannelSftp;
-import com.jcraft.jsch.JSchException;
-import com.jcraft.jsch.Session;
 
 import java.io.IOException;
 import java.io.InputStream;
@@ -39,11 +36,16 @@ public class SFTPInputStream extends FSInputStream {
 
     private InputStream wrappedStream;
     private ChannelSftp channel;
+    private SFTPConnectionPool connectionPool;
     private FileSystem.Statistics stats;
     private boolean closed;
     private long pos;
 
-    SFTPInputStream(InputStream stream, ChannelSftp channel, FileSystem.Statistics stats) {
+    SFTPInputStream(
+            InputStream stream,
+            ChannelSftp channel,
+            SFTPConnectionPool connectionPool,
+            FileSystem.Statistics stats) {
 
         if (stream == null) {
             throw new IllegalArgumentException(E_NULL_INPUT_STREAM);
@@ -53,6 +55,7 @@ public class SFTPInputStream extends FSInputStream {
         }
         this.wrappedStream = stream;
         this.channel = channel;
+        this.connectionPool = connectionPool;
         this.stats = stats;
 
         this.pos = 0;
@@ -110,19 +113,26 @@ public class SFTPInputStream extends FSInputStream {
         if (closed) {
             return;
         }
-        wrappedStream.close();
-        super.close();
-        closed = true;
-        if (!channel.isConnected()) {
-            throw new IOException(E_CLIENT_NOT_CONNECTED);
-        }
-
+        IOException closeFailure = null;
         try {
-            Session session = channel.getSession();
-            channel.disconnect();
-            session.disconnect();
-        } catch (JSchException e) {
-            throw new IOException(StringUtils.stringifyException(e));
+            wrappedStream.close();
+            super.close();
+        } catch (IOException e) {
+            closeFailure = e;
+        } finally {
+            closed = true;
+            try {
+                connectionPool.disconnect(channel);
+            } catch (IOException e) {
+                if (closeFailure == null) {
+                    closeFailure = e;
+                } else {
+                    closeFailure.addSuppressed(e);
+                }
+            }
+        }
+        if (closeFailure != null) {
+            throw closeFailure;
         }
     }
 }
diff --git a/seatunnel-connectors-v2/connector-file/connector-file-sftp/src/test/java/org/apache/seatunnel/connectors/seatunnel/file/sftp/SftpFileFactoryTest.java b/seatunnel-connectors-v2/connector-file/connector-file-sftp/src/test/java/org/apache/seatunnel/connectors/seatunnel/file/sftp/SftpFileFactoryTest.java
index cbf524a498..93d31661ea 100644
--- a/seatunnel-connectors-v2/connector-file/connector-file-sftp/src/test/java/org/apache/seatunnel/connectors/seatunnel/file/sftp/SftpFileFactoryTest.java
+++ b/seatunnel-connectors-v2/connector-file/connector-file-sftp/src/test/java/org/apache/seatunnel/connectors/seatunnel/file/sftp/SftpFileFactoryTest.java
@@ -18,11 +18,11 @@
 package org.apache.seatunnel.connectors.seatunnel.file.sftp;
 
 import org.apache.seatunnel.api.configuration.ReadonlyConfig;
-import org.apache.seatunnel.api.configuration.util.Expression;
+import org.apache.seatunnel.api.configuration.util.ConfigValidator;
 import org.apache.seatunnel.api.configuration.util.OptionRule;
-import org.apache.seatunnel.api.configuration.util.RequiredOption;
+import org.apache.seatunnel.api.configuration.util.OptionValidationException;
+import org.apache.seatunnel.connectors.seatunnel.file.config.FileBaseOptions;
 import org.apache.seatunnel.connectors.seatunnel.file.config.FileBaseSourceOptions;
-import org.apache.seatunnel.connectors.seatunnel.file.config.FileSyncMode;
 import org.apache.seatunnel.connectors.seatunnel.file.config.HadoopConf;
 import org.apache.seatunnel.connectors.seatunnel.file.sftp.config.SftpConf;
 import org.apache.seatunnel.connectors.seatunnel.file.sftp.sink.SftpFileSinkFactory;
@@ -63,21 +63,20 @@ class SftpFileFactoryTest {
                 optionRule.getOptionalOptions().contains(FileBaseSourceOptions.SCAN_INTERVAL));
         Assertions.assertTrue(
                 optionRule.getOptionalOptions().contains(FileBaseSourceOptions.START_MODE));
+        Assertions.assertTrue(
+                optionRule.getOptionalOptions().contains(FileBaseSourceOptions.POST_SYNC_ACTION));
+        Assertions.assertTrue(
+                optionRule.getOptionalOptions().contains(FileBaseSourceOptions.BACKUP_PATH));
+        Assertions.assertTrue(
+                optionRule.getOptionalOptions().contains(FileBaseSourceOptions.RETENTION_MAX_AGE));
+        Assertions.assertTrue(
+                optionRule
+                        .getOptionalOptions()
+                        .contains(FileBaseSourceOptions.RETENTION_CHECK_INTERVAL));
         Assertions.assertTrue(
                 optionRule.getOptionalOptions().stream()
                         .anyMatch(option -> "keyfile".equals(option.key())));
 
-        Expression expectExpression =
-                Expression.of(FileBaseSourceOptions.SYNC_MODE, FileSyncMode.UPDATE);
-        Assertions.assertTrue(
-                optionRule.getRequiredOptions().stream()
-                        .filter(RequiredOption.ConditionalRequiredOptions.class::isInstance)
-                        .map(RequiredOption.ConditionalRequiredOptions.class::cast)
-                        .filter(
-                                required ->
-                                        required.getOptions()
-                                                .contains(FileBaseSourceOptions.TARGET_PATH))
-                        .anyMatch(required -> expectExpression.equals(required.getExpression())));
         OptionRule sinkOptionRule = (new SftpFileSinkFactory()).optionRule();
         Assertions.assertNotNull(sinkOptionRule);
         Assertions.assertTrue(
@@ -85,6 +84,40 @@ class SftpFileFactoryTest {
                         .anyMatch(option -> "keyfile".equals(option.key())));
     }
 
+    @Test
+    void syncUpdateRequiresTargetPath() {
+        OptionRule optionRule = (new SftpFileSourceFactory()).optionRule();
+        Map<String, Object> config = sourceConfig();
+        config.put(FileBaseSourceOptions.SYNC_MODE.key(), "update");
+
+        Assertions.assertThrows(
+                OptionValidationException.class, () -> validate(config, optionRule));
+
+        config.put(FileBaseSourceOptions.TARGET_PATH.key(), "/target");
+        Assertions.assertDoesNotThrow(() -> validate(config, optionRule));
+    }
+
+    @Test
+    void postSyncActionValidation() {
+        OptionRule optionRule = (new SftpFileSourceFactory()).optionRule();
+        Map<String, Object> noneConfig = sourceConfig();
+        noneConfig.put(FileBaseSourceOptions.POST_SYNC_ACTION.key(), "none");
+        Assertions.assertDoesNotThrow(() -> validate(noneConfig, optionRule));
+
+        noneConfig.put(FileBaseSourceOptions.BACKUP_PATH.key(), "/backup");
+        noneConfig.put(FileBaseSourceOptions.RETENTION_MAX_AGE.key(), "7D");
+        noneConfig.put(FileBaseSourceOptions.RETENTION_CHECK_INTERVAL.key(), "1H");
+        Assertions.assertDoesNotThrow(() -> validate(noneConfig, optionRule));
+
+        Map<String, Object> backupConfig = sourceConfig();
+        backupConfig.put(FileBaseSourceOptions.POST_SYNC_ACTION.key(), "backup");
+        Assertions.assertThrows(
+                OptionValidationException.class, () -> validate(backupConfig, optionRule));
+
+        backupConfig.put(FileBaseSourceOptions.BACKUP_PATH.key(), "/backup");
+        Assertions.assertDoesNotThrow(() -> validate(backupConfig, optionRule));
+    }
+
     @Test
     void buildHadoopConfWithKeyfile() {
         Map<String, Object> configMap = new HashMap<>();
@@ -100,4 +133,14 @@ class SftpFileFactoryTest {
                 "/home/seatunnel/.ssh/id_rsa",
                 hadoopConf.getExtraOptions().get(SFTPFileSystem.FS_SFTP_KEYFILE));
     }
+
+    private static Map<String, Object> sourceConfig() {
+        Map<String, Object> config = new HashMap<>();
+        config.put(FileBaseOptions.FILE_PATH.key(), "/source");
+        return config;
+    }
+
+    private static void validate(Map<String, Object> config, OptionRule optionRule) {
+        ConfigValidator.of(ReadonlyConfig.fromMap(config)).validate(optionRule);
+    }
 }
diff --git a/seatunnel-connectors-v2/connector-file/connector-file-sftp/src/test/java/org/apache/seatunnel/connectors/seatunnel/file/sftp/system/SFTPConnectionPoolTest.java b/seatunnel-connectors-v2/connector-file/connector-file-sftp/src/test/java/org/apache/seatunnel/connectors/seatunnel/file/sftp/system/SFTPConnectionPoolTest.java
index cf26cbfbe5..a8177f64de 100644
--- a/seatunnel-connectors-v2/connector-file/connector-file-sftp/src/test/java/org/apache/seatunnel/connectors/seatunnel/file/sftp/system/SFTPConnectionPoolTest.java
+++ b/seatunnel-connectors-v2/connector-file/connector-file-sftp/src/test/java/org/apache/seatunnel/connectors/seatunnel/file/sftp/system/SFTPConnectionPoolTest.java
@@ -19,12 +19,16 @@ package org.apache.seatunnel.connectors.seatunnel.file.sftp.system;
 
 import org.junit.jupiter.api.Assertions;
 import org.junit.jupiter.api.Test;
+import org.mockito.MockedConstruction;
 import org.mockito.Mockito;
 
 import com.jcraft.jsch.ChannelSftp;
+import com.jcraft.jsch.JSch;
 import com.jcraft.jsch.JSchException;
 import com.jcraft.jsch.Session;
 
+import java.io.ByteArrayInputStream;
+import java.io.IOException;
 import java.lang.reflect.Field;
 import java.util.HashSet;
 import java.util.Map;
@@ -131,15 +135,155 @@ class SFTPConnectionPoolTest {
         Assertions.assertEquals(0, connectionPool.getIdleCount());
     }
 
+    /** Connections opened concurrently with shutdown must not escape pool ownership. */
+    @Test
+    void registerConnectionAfterShutdownShouldCloseChannel() throws Exception {
+        SFTPConnectionPool connectionPool = new SFTPConnectionPool(1, 0);
+        SFTPConnectionPool.ConnectionInfo connectionInfo =
+                new SFTPConnectionPool.ConnectionInfo("host", 22, "user");
+        Session session = Mockito.mock(Session.class);
+        Mockito.when(session.isConnected()).thenReturn(true);
+        TestChannelSftp channel = new TestChannelSftp(true, session);
+
+        connectionPool.shutdown();
+        boolean registered = connectionPool.registerConnection(channel, connectionInfo);
+
+        Assertions.assertFalse(registered);
+        Assertions.assertTrue(channel.wasDisconnected());
+        Mockito.verify(session).disconnect();
+        Assertions.assertEquals(0, connectionPool.getConnPoolSize());
+    }
+
+    /** A channel-creation failure must not leave its already-connected SSH session running. */
+    @Test
+    void connectShouldCloseSessionWhenSftpChannelOpenFails() throws Exception {
+        Session session = Mockito.mock(Session.class);
+        Mockito.when(session.isConnected()).thenReturn(true);
+        Mockito.when(session.openChannel("sftp"))
+                .thenThrow(new JSchException("SFTP channel open failed"));
+
+        try (MockedConstruction<JSch> ignored =
+                Mockito.mockConstruction(
+                        JSch.class,
+                        (jsch, context) ->
+                                Mockito.when(jsch.getSession("user", "host", 22))
+                                        .thenReturn(session))) {
+            SFTPConnectionPool connectionPool = new SFTPConnectionPool(1, 0);
+
+            IOException error =
+                    Assertions.assertThrows(
+                            IOException.class,
+                            () -> connectionPool.connect("host", 22, "user", "password", null));
+
+            Assertions.assertTrue(error.getMessage().contains("SFTP channel open failed"));
+        }
+
+        Mockito.verify(session).disconnect();
+    }
+
+    /** A failed SFTP channel connection must not leave either connection resource running. */
+    @Test
+    void connectShouldCloseChannelAndSessionWhenSftpChannelConnectFails() throws Exception {
+        Session session = Mockito.mock(Session.class);
+        Mockito.when(session.isConnected()).thenReturn(true);
+        TestChannelSftp channel =
+                new TestChannelSftp(
+                        true, session, new JSchException("SFTP channel connect failed"));
+        Mockito.when(session.openChannel("sftp")).thenReturn(channel);
+
+        try (MockedConstruction<JSch> ignored =
+                Mockito.mockConstruction(
+                        JSch.class,
+                        (jsch, context) ->
+                                Mockito.when(jsch.getSession("user", "host", 22))
+                                        .thenReturn(session))) {
+            SFTPConnectionPool connectionPool = new SFTPConnectionPool(1, 0);
+
+            IOException error =
+                    Assertions.assertThrows(
+                            IOException.class,
+                            () -> connectionPool.connect("host", 22, "user", "password", null));
+
+            Assertions.assertTrue(error.getMessage().contains("SFTP channel connect failed"));
+        }
+
+        Assertions.assertTrue(channel.wasDisconnected());
+        Mockito.verify(session).disconnect();
+    }
+
+    /**
+     * Shutdown must use the session captured at connect time if the channel loses its back-link.
+     */
+    @Test
+    void shutdownShouldCloseCapturedSessionWhenChannelCannotReturnSession() throws Exception {
+        Session session = Mockito.mock(Session.class);
+        Mockito.when(session.isConnected()).thenReturn(true);
+        TestChannelSftp channel =
+                new TestChannelSftp(
+                        true,
+                        session,
+                        null,
+                        new JSchException("Channel is no longer attached to its session"));
+        Mockito.when(session.openChannel("sftp")).thenReturn(channel);
+
+        try (MockedConstruction<JSch> ignored =
+                Mockito.mockConstruction(
+                        JSch.class,
+                        (jsch, context) ->
+                                Mockito.when(jsch.getSession("user", "host", 22))
+                                        .thenReturn(session))) {
+            SFTPConnectionPool connectionPool = new SFTPConnectionPool(1, 0);
+            connectionPool.connect("host", 22, "user", "password", null);
+
+            connectionPool.shutdown();
+        }
+
+        Assertions.assertTrue(channel.wasDisconnected());
+        Mockito.verify(session).disconnect();
+    }
+
+    /** Input streams must return their channel to the pool that owns the backing SSH session. */
+    @Test
+    void inputStreamCloseShouldReturnChannelToConnectionPool() throws Exception {
+        SFTPConnectionPool connectionPool = Mockito.mock(SFTPConnectionPool.class);
+        TestChannelSftp channel = new TestChannelSftp(true, Mockito.mock(Session.class));
+        SFTPInputStream inputStream =
+                new SFTPInputStream(
+                        new ByteArrayInputStream(new byte[] {1}), channel, connectionPool, null);
+
+        inputStream.close();
+        inputStream.close();
+
+        Mockito.verify(connectionPool).disconnect(channel);
+        Assertions.assertFalse(channel.wasDisconnected());
+    }
+
     /** Small concrete ChannelSftp stub that keeps Mockito away from final JSch internals. */
     private static final class TestChannelSftp extends ChannelSftp {
         private final boolean connected;
         private final Session session;
+        private final JSchException connectException;
+        private final JSchException getSessionException;
         private boolean disconnected;
 
         private TestChannelSftp(boolean connected, Session session) {
+            this(connected, session, null, null);
+        }
+
+        private TestChannelSftp(
+                boolean connected, Session session, JSchException connectException) {
+            this(connected, session, connectException, null);
+        }
+
+        private TestChannelSftp(
+                boolean connected,
+                Session session,
+                JSchException connectException,
+                JSchException getSessionException) {
             this.connected = connected;
             this.session = session;
+            this.connectException = connectException;
+            this.getSessionException = getSessionException;
         }
 
         @Override
@@ -147,6 +291,13 @@ class SFTPConnectionPoolTest {
             return connected;
         }
 
+        @Override
+        public void connect() throws JSchException {
+            if (connectException != null) {
+                throw connectException;
+            }
+        }
+
         @Override
         public void disconnect() {
             disconnected = true;
@@ -154,6 +305,9 @@ class SFTPConnectionPoolTest {
 
         @Override
         public Session getSession() throws JSchException {
+            if (getSessionException != null) {
+                throw getSessionException;
+            }
             return session;
         }
 
diff --git a/seatunnel-e2e/seatunnel-connector-v2-e2e/connector-file-ftp-e2e/src/test/java/org/apache/seatunnel/e2e/connector/file/ftp/FtpFileIT.java b/seatunnel-e2e/seatunnel-connector-v2-e2e/connector-file-ftp-e2e/src/test/java/org/apache/seatunnel/e2e/connector/file/ftp/FtpFileIT.java
index 8bd3d510ca..1577d28d5a 100644
--- a/seatunnel-e2e/seatunnel-connector-v2-e2e/connector-file-ftp-e2e/src/test/java/org/apache/seatunnel/e2e/connector/file/ftp/FtpFileIT.java
+++ b/seatunnel-e2e/seatunnel-connector-v2-e2e/connector-file-ftp-e2e/src/test/java/org/apache/seatunnel/e2e/connector/file/ftp/FtpFileIT.java
@@ -77,6 +77,17 @@ public class FtpFileIT extends TestSuiteBase implements TestResource {
 
     private static final String PASSWORD = "pass";
 
+    private static final String CONTINUOUS_DISTCP_PATH = "/tmp/seatunnel/continuous/distcp";
+
+    private static final String CONTINUOUS_DELETE_PATH = "/tmp/seatunnel/continuous/delete";
+
+    private static final String CONTINUOUS_BACKUP_PATH = "/tmp/seatunnel/continuous/backup";
+
+    private static final String CONTINUOUS_RETENTION_PATH = "/tmp/seatunnel/continuous/retention";
+
+    private static final String CONTINUOUS_NON_RECURSIVE_PATH =
+            "/tmp/seatunnel/continuous/non-recursive";
+
     private GenericContainer<?> ftpContainer;
 
     private String ftpHomeDir;
@@ -268,58 +279,236 @@ public class FtpFileIT extends TestSuiteBase implements TestResource {
             disabledReason = "Continuous discovery is a long-running job; only run in zeta engine.")
     public void testFtpBinaryUpdateModeContinuousDiscoveryDistcp(TestContainer container)
             throws IOException, InterruptedException {
-        resetContinuousTestPath();
-        putFtpFile("/tmp/seatunnel/continuous/src/test1.bin", "abc");
-
+        resetContinuousTestPath(CONTINUOUS_DISTCP_PATH);
         String jobId = String.valueOf(JobIdGenerator.newJobId());
-        CompletableFuture<Container.ExecResult> jobFuture =
-                CompletableFuture.supplyAsync(
-                        () -> {
-                            try {
-                                return container.executeJob(
-                                        "/text/ftp_binary_update_distcp_continuous.conf", jobId);
-                            } catch (Exception e) {
-                                throw new RuntimeException(e);
-                            }
-                        });
-
-        Awaitility.await()
-                .atMost(60, TimeUnit.SECONDS)
-                .untilAsserted(
-                        () ->
-                                Assertions.assertEquals(
-                                        "abc",
-                                        readFtpFile("/tmp/seatunnel/continuous/dst/test1.bin")));
-
-        long firstMtimeSeconds = getFtpFileMtimeSeconds("/tmp/seatunnel/continuous/dst/test1.bin");
-        Thread.sleep(2500);
-        long secondMtimeSeconds = getFtpFileMtimeSeconds("/tmp/seatunnel/continuous/dst/test1.bin");
-        Assertions.assertEquals(
-                firstMtimeSeconds,
-                secondMtimeSeconds,
-                "Continuous discovery should skip unchanged files in update mode.");
-
-        putFtpFile("/tmp/seatunnel/continuous/src/test2.bin", "def");
-        Awaitility.await()
-                .atMost(60, TimeUnit.SECONDS)
-                .untilAsserted(
-                        () ->
-                                Assertions.assertEquals(
-                                        "def",
-                                        readFtpFile("/tmp/seatunnel/continuous/dst/test2.bin")));
+        CompletableFuture<Container.ExecResult> jobFuture = null;
+        try {
+            putFtpFile(CONTINUOUS_DISTCP_PATH + "/src/test1.bin", "abc");
+
+            jobFuture =
+                    CompletableFuture.supplyAsync(
+                            () -> {
+                                try {
+                                    return container.executeJob(
+                                            "/text/ftp_binary_update_distcp_continuous.conf",
+                                            jobId,
+                                            "ftpHost=" + ftpPassiveAddress);
+                                } catch (Exception e) {
+                                    throw new RuntimeException(e);
+                                }
+                            });
+
+            Awaitility.await()
+                    .atMost(60, TimeUnit.SECONDS)
+                    .untilAsserted(
+                            () ->
+                                    Assertions.assertEquals(
+                                            "abc",
+                                            readFtpFile(
+                                                    CONTINUOUS_DISTCP_PATH + "/dst/test1.bin")));
+
+            long firstMtimeSeconds =
+                    getFtpFileMtimeSeconds(CONTINUOUS_DISTCP_PATH + "/dst/test1.bin");
+            Thread.sleep(2500);
+            long secondMtimeSeconds =
+                    getFtpFileMtimeSeconds(CONTINUOUS_DISTCP_PATH + "/dst/test1.bin");
+            Assertions.assertEquals(
+                    firstMtimeSeconds,
+                    secondMtimeSeconds,
+                    "Continuous discovery should skip unchanged files in update mode.");
+
+            putFtpFile(CONTINUOUS_DISTCP_PATH + "/src/test2.bin", "def");
+            Awaitility.await()
+                    .atMost(60, TimeUnit.SECONDS)
+                    .untilAsserted(
+                            () ->
+                                    Assertions.assertEquals(
+                                            "def",
+                                            readFtpFile(
+                                                    CONTINUOUS_DISTCP_PATH + "/dst/test2.bin")));
+
+            Container.ExecResult cancelResult = container.cancelJob(jobId);
+            Assertions.assertEquals(0, cancelResult.getExitCode(), cancelResult.getStderr());
+            waitContinuousJobExit(container, jobId, jobFuture);
+        } finally {
+            cancelContinuousJobQuietly(container, jobId, jobFuture);
+            deleteFileFromContainer(ftpHomeDir + CONTINUOUS_DISTCP_PATH);
+        }
+    }
 
-        Container.ExecResult cancelResult = container.cancelJob(jobId);
-        Assertions.assertEquals(0, cancelResult.getExitCode(), cancelResult.getStderr());
+    @TestTemplate
+    @DisabledOnContainer(
+            value = {},
+            type = {EngineType.FLINK, EngineType.SPARK},
+            disabledReason = "Continuous discovery is a long-running job; only run in zeta engine.")
+    public void testFtpBinaryUpdateModeContinuousDiscoveryPostSyncDelete(TestContainer container)
+            throws IOException, InterruptedException {
+        resetContinuousTestPath(CONTINUOUS_DELETE_PATH);
+        String jobId = String.valueOf(JobIdGenerator.newJobId());
+        CompletableFuture<Container.ExecResult> jobFuture = null;
+        try {
+            putFtpFile(CONTINUOUS_DELETE_PATH + "/src/delete-test.bin", "abc");
+
+            jobFuture =
+                    CompletableFuture.supplyAsync(
+                            () -> {
+                                try {
+                                    return container.executeJob(
+                                            "/text/ftp_binary_update_distcp_continuous_post_sync_delete.conf",
+                                            jobId,
+                                            "ftpHost=" + ftpPassiveAddress);
+                                } catch (Exception e) {
+                                    throw new RuntimeException(e);
+                                }
+                            });
+
+            Awaitility.await()
+                    .atMost(60, TimeUnit.SECONDS)
+                    .untilAsserted(
+                            () ->
+                                    Assertions.assertEquals(
+                                            "abc",
+                                            readFtpFile(
+                                                    CONTINUOUS_DELETE_PATH
+                                                            + "/dst/delete-test.bin")));
+
+            Awaitility.await()
+                    .atMost(120, TimeUnit.SECONDS)
+                    .pollInterval(2, TimeUnit.SECONDS)
+                    .untilAsserted(
+                            () ->
+                                    Assertions.assertFalse(
+                                            isFtpFileExists(
+                                                    CONTINUOUS_DELETE_PATH
+                                                            + "/src/delete-test.bin"),
+                                            "source file should be deleted after checkpoint-gated post-sync commit"));
+
+            Container.ExecResult cancelResult = container.cancelJob(jobId);
+            Assertions.assertEquals(0, cancelResult.getExitCode(), cancelResult.getStderr());
+            waitContinuousJobExit(container, jobId, jobFuture);
+        } finally {
+            cancelContinuousJobQuietly(container, jobId, jobFuture);
+            deleteFileFromContainer(ftpHomeDir + CONTINUOUS_DELETE_PATH);
+        }
+    }
 
-        Container.ExecResult execResult;
+    @TestTemplate
+    @DisabledOnContainer(
+            value = {},
+            type = {EngineType.FLINK, EngineType.SPARK},
+            disabledReason = "Continuous discovery is a long-running job; only run in zeta engine.")
+    public void testFtpBinaryUpdateModeContinuousDiscoveryPostSyncBackup(TestContainer container)
+            throws IOException, InterruptedException {
+        resetContinuousTestPath(CONTINUOUS_BACKUP_PATH);
+        String jobId = String.valueOf(JobIdGenerator.newJobId());
+        CompletableFuture<Container.ExecResult> jobFuture = null;
         try {
-            execResult = jobFuture.get(120, TimeUnit.SECONDS);
-        } catch (Exception e) {
-            throw new RuntimeException("Wait continuous job exit failed.", e);
+            putFtpFile(CONTINUOUS_BACKUP_PATH + "/src/backup-test.bin", "abc");
+
+            jobFuture =
+                    CompletableFuture.supplyAsync(
+                            () -> {
+                                try {
+                                    return container.executeJob(
+                                            "/text/ftp_binary_update_distcp_continuous_post_sync_backup.conf",
+                                            jobId,
+                                            "ftpHost=" + ftpPassiveAddress);
+                                } catch (Exception e) {
+                                    throw new RuntimeException(e);
+                                }
+                            });
+
+            Awaitility.await()
+                    .atMost(120, TimeUnit.SECONDS)
+                    .pollInterval(2, TimeUnit.SECONDS)
+                    .untilAsserted(
+                            () ->
+                                    Assertions.assertEquals(
+                                            "abc",
+                                            readFtpFile(
+                                                    CONTINUOUS_BACKUP_PATH
+                                                            + "/dst/backup-test.bin")));
+
+            Awaitility.await()
+                    .atMost(120, TimeUnit.SECONDS)
+                    .pollInterval(2, TimeUnit.SECONDS)
+                    .untilAsserted(
+                            () ->
+                                    Assertions.assertFalse(
+                                            isFtpFileExists(
+                                                    CONTINUOUS_BACKUP_PATH
+                                                            + "/src/backup-test.bin"),
+                                            "source file should be moved from source path after backup commit"));
+
+            Awaitility.await()
+                    .atMost(120, TimeUnit.SECONDS)
+                    .pollInterval(2, TimeUnit.SECONDS)
+                    .untilAsserted(
+                            () ->
+                                    Assertions.assertTrue(
+                                            countFtpFilesByNamePattern(
+                                                            CONTINUOUS_BACKUP_PATH + "/backup",
+                                                            "backup-test.bin.v*")
+                                                    > 0,
+                                            "backup target should contain version-suffixed file"));
+
+            Container.ExecResult cancelResult = container.cancelJob(jobId);
+            Assertions.assertEquals(0, cancelResult.getExitCode(), cancelResult.getStderr());
+            waitContinuousJobExit(container, jobId, jobFuture);
+        } finally {
+            cancelContinuousJobQuietly(container, jobId, jobFuture);
+            deleteFileFromContainer(ftpHomeDir + CONTINUOUS_BACKUP_PATH);
         }
-        Assertions.assertEquals(0, execResult.getExitCode(), execResult.getStderr());
+    }
 
-        deleteFileFromContainer(ftpHomeDir + "/tmp/seatunnel/continuous");
+    @TestTemplate
+    @DisabledOnContainer(
+            value = {},
+            type = {EngineType.FLINK, EngineType.SPARK},
+            disabledReason = "Continuous discovery is a long-running job; only run in zeta engine.")
+    public void testFtpContinuousBackupRetentionCleanup(TestContainer container)
+            throws IOException, InterruptedException {
+        resetContinuousTestPath(CONTINUOUS_RETENTION_PATH);
+        String jobId = String.valueOf(JobIdGenerator.newJobId());
+        CompletableFuture<Container.ExecResult> jobFuture = null;
+        try {
+            putFtpFile(CONTINUOUS_RETENTION_PATH + "/src/retention-input.bin", "input");
+            putFtpFile(CONTINUOUS_RETENTION_PATH + "/backup/retention-old.bin.v3_123456", "abc");
+            setFtpFileMtimeToPast(
+                    CONTINUOUS_RETENTION_PATH + "/backup/retention-old.bin.v3_123456");
+
+            jobFuture =
+                    CompletableFuture.supplyAsync(
+                            () -> {
+                                try {
+                                    return container.executeJob(
+                                            "/text/ftp_binary_update_distcp_continuous_post_sync_backup_retention.conf",
+                                            jobId,
+                                            "ftpHost=" + ftpPassiveAddress);
+                                } catch (Exception e) {
+                                    throw new RuntimeException(e);
+                                }
+                            });
+
+            Awaitility.await()
+                    .atMost(120, TimeUnit.SECONDS)
+                    .pollInterval(2, TimeUnit.SECONDS)
+                    .untilAsserted(
+                            () ->
+                                    Assertions.assertEquals(
+                                            0L,
+                                            countFtpFilesByNamePattern(
+                                                    CONTINUOUS_RETENTION_PATH + "/backup",
+                                                    "retention-old.bin.v*"),
+                                            "retention should remove expired SeaTunnel backup files"));
+
+            Container.ExecResult cancelResult = container.cancelJob(jobId);
+            Assertions.assertEquals(0, cancelResult.getExitCode(), cancelResult.getStderr());
+            waitContinuousJobExit(container, jobId, jobFuture);
+        } finally {
+            cancelContinuousJobQuietly(container, jobId, jobFuture);
+            deleteFileFromContainer(ftpHomeDir + CONTINUOUS_RETENTION_PATH);
+        }
     }
 
     @TestTemplate
@@ -329,47 +518,48 @@ public class FtpFileIT extends TestSuiteBase implements TestResource {
             disabledReason = "Continuous discovery is a long-running job; only run in zeta engine.")
     public void testFtpBinaryUpdateModeContinuousDiscoveryWithNonRecursiveScan(
             TestContainer container) throws IOException, InterruptedException {
-        resetContinuousTestPath();
+        resetContinuousTestPath(CONTINUOUS_NON_RECURSIVE_PATH);
 
         String jobId = String.valueOf(JobIdGenerator.newJobId());
-        CompletableFuture<Container.ExecResult> jobFuture =
-                CompletableFuture.supplyAsync(
-                        () -> {
-                            try {
-                                return container.executeJob(
-                                        "/text/ftp_binary_update_distcp_continuous_non_recursive.conf",
-                                        jobId);
-                            } catch (Exception e) {
-                                throw new RuntimeException(e);
-                            }
-                        });
-
-        putFtpFile("/tmp/seatunnel/continuous/src/root.bin", "root");
-        putFtpFile("/tmp/seatunnel/continuous/src/subdir/nested.bin", "nested");
-
-        Awaitility.await()
-                .atMost(60, TimeUnit.SECONDS)
-                .untilAsserted(
-                        () ->
-                                Assertions.assertEquals(
-                                        "root",
-                                        readFtpFile("/tmp/seatunnel/continuous/dst/root.bin")));
-
-        Thread.sleep(3000);
-        Assertions.assertFalse(isFtpFileExists("/tmp/seatunnel/continuous/dst/subdir/nested.bin"));
-
-        Container.ExecResult cancelResult = container.cancelJob(jobId);
-        Assertions.assertEquals(0, cancelResult.getExitCode(), cancelResult.getStderr());
-
-        Container.ExecResult execResult;
+        CompletableFuture<Container.ExecResult> jobFuture = null;
         try {
-            execResult = jobFuture.get(120, TimeUnit.SECONDS);
-        } catch (Exception e) {
-            throw new RuntimeException("Wait continuous job exit failed.", e);
+            putFtpFile(CONTINUOUS_NON_RECURSIVE_PATH + "/src/root.bin", "root");
+            putFtpFile(CONTINUOUS_NON_RECURSIVE_PATH + "/src/subdir/nested.bin", "nested");
+
+            jobFuture =
+                    CompletableFuture.supplyAsync(
+                            () -> {
+                                try {
+                                    return container.executeJob(
+                                            "/text/ftp_binary_update_distcp_continuous_non_recursive.conf",
+                                            jobId,
+                                            "ftpHost=" + ftpPassiveAddress);
+                                } catch (Exception e) {
+                                    throw new RuntimeException(e);
+                                }
+                            });
+
+            Awaitility.await()
+                    .atMost(60, TimeUnit.SECONDS)
+                    .untilAsserted(
+                            () ->
+                                    Assertions.assertEquals(
+                                            "root",
+                                            readFtpFile(
+                                                    CONTINUOUS_NON_RECURSIVE_PATH
+                                                            + "/dst/root.bin")));
+
+            Thread.sleep(3000);
+            Assertions.assertFalse(
+                    isFtpFileExists(CONTINUOUS_NON_RECURSIVE_PATH + "/dst/subdir/nested.bin"));
+
+            Container.ExecResult cancelResult = container.cancelJob(jobId);
+            Assertions.assertEquals(0, cancelResult.getExitCode(), cancelResult.getStderr());
+            waitContinuousJobExit(container, jobId, jobFuture);
+        } finally {
+            cancelContinuousJobQuietly(container, jobId, jobFuture);
+            deleteFileFromContainer(ftpHomeDir + CONTINUOUS_NON_RECURSIVE_PATH);
         }
-        Assertions.assertEquals(0, execResult.getExitCode(), execResult.getStderr());
-
-        deleteFileFromContainer(ftpHomeDir + "/tmp/seatunnel/continuous");
     }
 
     @TestTemplate
@@ -609,37 +799,41 @@ public class FtpFileIT extends TestSuiteBase implements TestResource {
                 "sh", "-c", "chown -R ftp:ftp " + ftpHomeDir + "/tmp/seatunnel/update || true");
     }
 
-    private void resetContinuousTestPath() throws IOException, InterruptedException {
-        deleteFileFromContainer(ftpHomeDir + "/tmp/seatunnel/continuous");
+    private void resetContinuousTestPath(String continuousPath)
+            throws IOException, InterruptedException {
+        deleteFileFromContainer(ftpHomeDir + continuousPath);
         Container.ExecResult mkdirResult =
                 ftpContainer.execInContainer(
                         "sh",
                         "-c",
                         "mkdir -p "
                                 + ftpHomeDir
-                                + "/tmp/seatunnel/continuous/src "
+                                + continuousPath
+                                + "/src "
                                 + ftpHomeDir
-                                + "/tmp/seatunnel/continuous/dst "
+                                + continuousPath
+                                + "/dst "
                                 + ftpHomeDir
-                                + "/tmp/seatunnel/continuous/tmp");
+                                + continuousPath
+                                + "/tmp");
         Assertions.assertEquals(0, mkdirResult.getExitCode(), mkdirResult.getStderr());
         ftpContainer.execInContainer(
-                "sh", "-c", "chmod -R 777 " + ftpHomeDir + "/tmp/seatunnel/continuous || true");
+                "sh", "-c", "chmod -R 777 " + ftpHomeDir + continuousPath + " || true");
         ftpContainer.execInContainer(
-                "sh", "-c", "chown -R ftp:ftp " + ftpHomeDir + "/tmp/seatunnel/continuous || true");
+                "sh", "-c", "chown -R ftp:ftp " + ftpHomeDir + continuousPath + " || true");
     }
 
     private void putFtpFile(String ftpPath, String content)
             throws IOException, InterruptedException {
         String containerPath = ftpHomeDir + ftpPath;
         String command =
-                "mkdir -p $(dirname '"
+                "parent=$(dirname '"
                         + containerPath
-                        + "') && printf '"
+                        + "') && mkdir -p \"$parent\" && printf '"
                         + content
                         + "' > '"
                         + containerPath
-                        + "' && chmod 666 '"
+                        + "' && chmod -R 777 \"$parent\" && chmod 666 '"
                         + containerPath
                         + "'";
         Container.ExecResult putResult = ftpContainer.execInContainer("sh", "-c", command);
@@ -669,6 +863,78 @@ public class FtpFileIT extends TestSuiteBase implements TestResource {
         return Long.parseLong(result.getStdout().trim());
     }
 
+    private long countFtpFilesByNamePattern(String ftpPath, String namePattern)
+            throws IOException, InterruptedException {
+        String containerPath = ftpHomeDir + ftpPath;
+        Container.ExecResult result =
+                ftpContainer.execInContainer(
+                        "sh",
+                        "-c",
+                        "if [ -d '"
+                                + containerPath
+                                + "' ]; then find '"
+                                + containerPath
+                                + "' -type f -name '"
+                                + namePattern
+                                + "' | wc -l; else echo 0; fi");
+        Assertions.assertEquals(0, result.getExitCode(), result.getStderr());
+        return Long.parseLong(result.getStdout().trim());
+    }
+
+    private void setFtpFileMtimeToPast(String ftpPath) throws IOException, InterruptedException {
+        Container.ExecResult result =
+                ftpContainer.execInContainer(
+                        "sh", "-c", "touch -t 202001010000.00 '" + ftpHomeDir + ftpPath + "'");
+        Assertions.assertEquals(0, result.getExitCode(), result.getStderr());
+    }
+
+    /**
+     * Best-effort cleanup for assertion failures so a continuous test cannot leak a running job.
+     */
+    private void cancelContinuousJobQuietly(
+            TestContainer container,
+            String jobId,
+            CompletableFuture<Container.ExecResult> jobFuture) {
+        if (jobFuture == null || jobFuture.isDone()) {
+            return;
+        }
+        try {
+            String status = container.getJobStatus(jobId);
+            if (!"CANCELED".equals(status)
+                    && !"FINISHED".equals(status)
+                    && !"FAILED".equals(status)) {
+                container.cancelJob(jobId);
+            }
+            Awaitility.await()
+                    .atMost(180, TimeUnit.SECONDS)
+                    .pollInterval(2, TimeUnit.SECONDS)
+                    .until(jobFuture::isDone);
+        } catch (Exception e) {
+            log.warn("Failed to clean up continuous FTP job {}.", jobId, e);
+        }
+    }
+
+    private void waitContinuousJobExit(
+            TestContainer container,
+            String jobId,
+            CompletableFuture<Container.ExecResult> jobFuture) {
+        Awaitility.await()
+                .atMost(60, TimeUnit.SECONDS)
+                .pollInterval(2, TimeUnit.SECONDS)
+                .untilAsserted(
+                        () -> Assertions.assertEquals("CANCELED", container.getJobStatus(jobId)));
+        Awaitility.await()
+                .atMost(180, TimeUnit.SECONDS)
+                .pollInterval(2, TimeUnit.SECONDS)
+                .until(jobFuture::isDone);
+        try {
+            Container.ExecResult execResult = jobFuture.get(30, TimeUnit.SECONDS);
+            Assertions.assertEquals(0, execResult.getExitCode(), execResult.getStderr());
+        } catch (Exception e) {
+            throw new RuntimeException("Wait continuous job exit failed.", e);
+        }
+    }
+
     private String getFtpUserHomeDir() throws IOException, InterruptedException {
         // Prefer vsftpd local_root as the real filesystem root used by FTP paths in test configs.
         // In some images, FTP users are created as virtual users and may not exist in /etc/passwd.
diff --git a/seatunnel-e2e/seatunnel-connector-v2-e2e/connector-file-ftp-e2e/src/test/resources/text/ftp_binary_update_distcp_continuous.conf b/seatunnel-e2e/seatunnel-connector-v2-e2e/connector-file-ftp-e2e/src/test/resources/text/ftp_binary_update_distcp_continuous.conf
index 8c1d0c3745..b91877b126 100644
--- a/seatunnel-e2e/seatunnel-connector-v2-e2e/connector-file-ftp-e2e/src/test/resources/text/ftp_binary_update_distcp_continuous.conf
+++ b/seatunnel-e2e/seatunnel-connector-v2-e2e/connector-file-ftp-e2e/src/test/resources/text/ftp_binary_update_distcp_continuous.conf
@@ -23,12 +23,12 @@ env {
 
 source {
   FtpFile {
-    host = "ftp"
+    host = ${ftpHost}
     port = 21
     user = seatunnel
     password = pass
-
-    path = "/tmp/seatunnel/continuous/src"
+    connection_mode = "passive_local"
+    path = "/tmp/seatunnel/continuous/distcp/src"
     file_format_type = "binary"
 
     discovery_mode = "continuous"
@@ -36,7 +36,7 @@ source {
     start_mode = "earliest"
 
     sync_mode = "update"
-    target_path = "/tmp/seatunnel/continuous/dst"
+    target_path = "/tmp/seatunnel/continuous/distcp/dst"
     update_strategy = "distcp"
     compare_mode = "len_mtime"
   }
@@ -44,13 +44,13 @@ source {
 
 sink {
   FtpFile {
-    host = "ftp"
+    host = ${ftpHost}
     port = 21
     user = seatunnel
     password = pass
-
-    path = "/tmp/seatunnel/continuous/dst"
-    tmp_path = "/tmp/seatunnel/continuous/tmp"
+    connection_mode = "passive_local"
+    path = "/tmp/seatunnel/continuous/distcp/dst"
+    tmp_path = "/tmp/seatunnel/continuous/distcp/tmp"
     file_format_type = "binary"
   }
 }
diff --git a/seatunnel-e2e/seatunnel-connector-v2-e2e/connector-file-ftp-e2e/src/test/resources/text/ftp_binary_update_distcp_continuous_non_recursive.conf b/seatunnel-e2e/seatunnel-connector-v2-e2e/connector-file-ftp-e2e/src/test/resources/text/ftp_binary_update_distcp_continuous_non_recursive.conf
index 3d88995203..f24b5dfed8 100644
--- a/seatunnel-e2e/seatunnel-connector-v2-e2e/connector-file-ftp-e2e/src/test/resources/text/ftp_binary_update_distcp_continuous_non_recursive.conf
+++ b/seatunnel-e2e/seatunnel-connector-v2-e2e/connector-file-ftp-e2e/src/test/resources/text/ftp_binary_update_distcp_continuous_non_recursive.conf
@@ -23,12 +23,12 @@ env {
 
 source {
   FtpFile {
-    host = "ftp"
+    host = ${ftpHost}
     port = 21
     user = seatunnel
     password = pass
-
-    path = "/tmp/seatunnel/continuous/src"
+    connection_mode = "passive_local"
+    path = "/tmp/seatunnel/continuous/non-recursive/src"
     file_format_type = "binary"
 
     discovery_mode = "continuous"
@@ -36,7 +36,7 @@ source {
     start_mode = "earliest"
 
     sync_mode = "update"
-    target_path = "/tmp/seatunnel/continuous/dst"
+    target_path = "/tmp/seatunnel/continuous/non-recursive/dst"
     update_strategy = "distcp"
     compare_mode = "len_mtime"
     recursive_file_scan = false
@@ -45,13 +45,13 @@ source {
 
 sink {
   FtpFile {
-    host = "ftp"
+    host = ${ftpHost}
     port = 21
     user = seatunnel
     password = pass
-
-    path = "/tmp/seatunnel/continuous/dst"
-    tmp_path = "/tmp/seatunnel/continuous/tmp"
+    connection_mode = "passive_local"
+    path = "/tmp/seatunnel/continuous/non-recursive/dst"
+    tmp_path = "/tmp/seatunnel/continuous/non-recursive/tmp"
     file_format_type = "binary"
   }
 }
diff --git a/seatunnel-e2e/seatunnel-connector-v2-e2e/connector-file-ftp-e2e/src/test/resources/text/ftp_binary_update_distcp_continuous_non_recursive.conf b/seatunnel-e2e/seatunnel-connector-v2-e2e/connector-file-ftp-e2e/src/test/resources/text/ftp_binary_update_distcp_continuous_post_sync_backup.conf
similarity index 75%
copy from seatunnel-e2e/seatunnel-connector-v2-e2e/connector-file-ftp-e2e/src/test/resources/text/ftp_binary_update_distcp_continuous_non_recursive.conf
copy to seatunnel-e2e/seatunnel-connector-v2-e2e/connector-file-ftp-e2e/src/test/resources/text/ftp_binary_update_distcp_continuous_post_sync_backup.conf
index 3d88995203..59df0f850f 100644
--- a/seatunnel-e2e/seatunnel-connector-v2-e2e/connector-file-ftp-e2e/src/test/resources/text/ftp_binary_update_distcp_continuous_non_recursive.conf
+++ b/seatunnel-e2e/seatunnel-connector-v2-e2e/connector-file-ftp-e2e/src/test/resources/text/ftp_binary_update_distcp_continuous_post_sync_backup.conf
@@ -23,12 +23,12 @@ env {
 
 source {
   FtpFile {
-    host = "ftp"
+    host = ${ftpHost}
     port = 21
     user = seatunnel
     password = pass
-
-    path = "/tmp/seatunnel/continuous/src"
+    connection_mode = "passive_local"
+    path = "/tmp/seatunnel/continuous/backup/src"
     file_format_type = "binary"
 
     discovery_mode = "continuous"
@@ -36,22 +36,24 @@ source {
     start_mode = "earliest"
 
     sync_mode = "update"
-    target_path = "/tmp/seatunnel/continuous/dst"
+    target_path = "/tmp/seatunnel/continuous/backup/dst"
     update_strategy = "distcp"
     compare_mode = "len_mtime"
-    recursive_file_scan = false
+
+    post_sync_action = "backup"
+    backup_path = "/tmp/seatunnel/continuous/backup/backup"
   }
 }
 
 sink {
   FtpFile {
-    host = "ftp"
+    host = ${ftpHost}
     port = 21
     user = seatunnel
     password = pass
-
-    path = "/tmp/seatunnel/continuous/dst"
-    tmp_path = "/tmp/seatunnel/continuous/tmp"
+    connection_mode = "passive_local"
+    path = "/tmp/seatunnel/continuous/backup/dst"
+    tmp_path = "/tmp/seatunnel/continuous/backup/tmp"
     file_format_type = "binary"
   }
 }
diff --git a/seatunnel-e2e/seatunnel-connector-v2-e2e/connector-file-ftp-e2e/src/test/resources/text/ftp_binary_update_distcp_continuous_non_recursive.conf b/seatunnel-e2e/seatunnel-connector-v2-e2e/connector-file-ftp-e2e/src/test/resources/text/ftp_binary_update_distcp_continuous_post_sync_backup_retention.conf
similarity index 71%
copy from seatunnel-e2e/seatunnel-connector-v2-e2e/connector-file-ftp-e2e/src/test/resources/text/ftp_binary_update_distcp_continuous_non_recursive.conf
copy to seatunnel-e2e/seatunnel-connector-v2-e2e/connector-file-ftp-e2e/src/test/resources/text/ftp_binary_update_distcp_continuous_post_sync_backup_retention.conf
index 3d88995203..edf6b67ef9 100644
--- a/seatunnel-e2e/seatunnel-connector-v2-e2e/connector-file-ftp-e2e/src/test/resources/text/ftp_binary_update_distcp_continuous_non_recursive.conf
+++ b/seatunnel-e2e/seatunnel-connector-v2-e2e/connector-file-ftp-e2e/src/test/resources/text/ftp_binary_update_distcp_continuous_post_sync_backup_retention.conf
@@ -23,12 +23,12 @@ env {
 
 source {
   FtpFile {
-    host = "ftp"
+    host = ${ftpHost}
     port = 21
     user = seatunnel
     password = pass
-
-    path = "/tmp/seatunnel/continuous/src"
+    connection_mode = "passive_local"
+    path = "/tmp/seatunnel/continuous/retention/src"
     file_format_type = "binary"
 
     discovery_mode = "continuous"
@@ -36,22 +36,26 @@ source {
     start_mode = "earliest"
 
     sync_mode = "update"
-    target_path = "/tmp/seatunnel/continuous/dst"
+    target_path = "/tmp/seatunnel/continuous/retention/dst"
     update_strategy = "distcp"
     compare_mode = "len_mtime"
-    recursive_file_scan = false
+
+    post_sync_action = "backup"
+    backup_path = "/tmp/seatunnel/continuous/retention/backup"
+    retention_max_age = "1S"
+    retention_check_interval = "1S"
   }
 }
 
 sink {
   FtpFile {
-    host = "ftp"
+    host = ${ftpHost}
     port = 21
     user = seatunnel
     password = pass
-
-    path = "/tmp/seatunnel/continuous/dst"
-    tmp_path = "/tmp/seatunnel/continuous/tmp"
+    connection_mode = "passive_local"
+    path = "/tmp/seatunnel/continuous/retention/dst"
+    tmp_path = "/tmp/seatunnel/continuous/retention/tmp"
     file_format_type = "binary"
   }
 }
diff --git a/seatunnel-e2e/seatunnel-connector-v2-e2e/connector-file-ftp-e2e/src/test/resources/text/ftp_binary_update_distcp_continuous_non_recursive.conf b/seatunnel-e2e/seatunnel-connector-v2-e2e/connector-file-ftp-e2e/src/test/resources/text/ftp_binary_update_distcp_continuous_post_sync_delete.conf
similarity index 77%
copy from seatunnel-e2e/seatunnel-connector-v2-e2e/connector-file-ftp-e2e/src/test/resources/text/ftp_binary_update_distcp_continuous_non_recursive.conf
copy to seatunnel-e2e/seatunnel-connector-v2-e2e/connector-file-ftp-e2e/src/test/resources/text/ftp_binary_update_distcp_continuous_post_sync_delete.conf
index 3d88995203..94e9241475 100644
--- a/seatunnel-e2e/seatunnel-connector-v2-e2e/connector-file-ftp-e2e/src/test/resources/text/ftp_binary_update_distcp_continuous_non_recursive.conf
+++ b/seatunnel-e2e/seatunnel-connector-v2-e2e/connector-file-ftp-e2e/src/test/resources/text/ftp_binary_update_distcp_continuous_post_sync_delete.conf
@@ -23,12 +23,12 @@ env {
 
 source {
   FtpFile {
-    host = "ftp"
+    host = ${ftpHost}
     port = 21
     user = seatunnel
     password = pass
-
-    path = "/tmp/seatunnel/continuous/src"
+    connection_mode = "passive_local"
+    path = "/tmp/seatunnel/continuous/delete/src"
     file_format_type = "binary"
 
     discovery_mode = "continuous"
@@ -36,22 +36,23 @@ source {
     start_mode = "earliest"
 
     sync_mode = "update"
-    target_path = "/tmp/seatunnel/continuous/dst"
+    target_path = "/tmp/seatunnel/continuous/delete/dst"
     update_strategy = "distcp"
     compare_mode = "len_mtime"
-    recursive_file_scan = false
+
+    post_sync_action = "delete"
   }
 }
 
 sink {
   FtpFile {
-    host = "ftp"
+    host = ${ftpHost}
     port = 21
     user = seatunnel
     password = pass
-
-    path = "/tmp/seatunnel/continuous/dst"
-    tmp_path = "/tmp/seatunnel/continuous/tmp"
+    connection_mode = "passive_local"
+    path = "/tmp/seatunnel/continuous/delete/dst"
+    tmp_path = "/tmp/seatunnel/continuous/delete/tmp"
     file_format_type = "binary"
   }
 }
diff --git a/seatunnel-e2e/seatunnel-connector-v2-e2e/connector-file-hadoop-e2e/src/test/java/org/apache/seatunnel/e2e/connector/file/hdfs/HdfsFileIT.java b/seatunnel-e2e/seatunnel-connector-v2-e2e/connector-file-hadoop-e2e/src/test/java/org/apache/seatunnel/e2e/connector/file/hdfs/HdfsFileIT.java
index 0577eaf42d..095dde01e5 100644
--- a/seatunnel-e2e/seatunnel-connector-v2-e2e/connector-file-hadoop-e2e/src/test/java/org/apache/seatunnel/e2e/connector/file/hdfs/HdfsFileIT.java
+++ b/seatunnel-e2e/seatunnel-connector-v2-e2e/connector-file-hadoop-e2e/src/test/java/org/apache/seatunnel/e2e/connector/file/hdfs/HdfsFileIT.java
@@ -330,18 +330,138 @@ public class HdfsFileIT extends TestSuiteBase implements TestResource {
         Thread.sleep(3000);
         Assertions.assertFalse(isHdfsFileExists("/continuous/dst/subdir/nested.bin"));
 
-        org.testcontainers.containers.Container.ExecResult cancelResult =
-                container.cancelJob(jobId);
-        Assertions.assertEquals(0, cancelResult.getExitCode(), cancelResult.getStderr());
+        cancelContinuousJob(container, jobId, jobFuture);
+        nameNode.execInContainer("bash", "-c", "hdfs dfs -rm -r -f /continuous || true");
+    }
 
-        org.testcontainers.containers.Container.ExecResult execResult;
-        try {
-            execResult = jobFuture.get(120, TimeUnit.SECONDS);
-        } catch (Exception e) {
-            throw new RuntimeException("Wait continuous job exit failed.", e);
-        }
-        Assertions.assertEquals(0, execResult.getExitCode(), execResult.getStderr());
+    @TestTemplate
+    @DisabledOnContainer(
+            value = {},
+            type = {EngineType.FLINK, EngineType.SPARK},
+            disabledReason = "Continuous discovery is a long-running job; only run in zeta engine.")
+    public void testHdfsBinaryUpdateModeContinuousDiscoveryPostSyncDelete(TestContainer container)
+            throws IOException, InterruptedException {
+        resetContinuousTestPath();
+        putHdfsFile("/continuous/src/delete-test.bin", "abc");
+
+        String jobId = String.valueOf(JobIdGenerator.newJobId());
+        CompletableFuture<org.testcontainers.containers.Container.ExecResult> jobFuture =
+                CompletableFuture.supplyAsync(
+                        () -> {
+                            try {
+                                return container.executeJob(
+                                        "/hdfs_binary_update_distcp_continuous_post_sync_delete.conf",
+                                        jobId);
+                            } catch (Exception e) {
+                                throw new RuntimeException(e);
+                            }
+                        });
+
+        Awaitility.await()
+                .atMost(60, TimeUnit.SECONDS)
+                .untilAsserted(
+                        () ->
+                                Assertions.assertEquals(
+                                        "abc", readHdfsFile("/continuous/dst/delete-test.bin")));
+
+        Awaitility.await()
+                .atMost(60, TimeUnit.SECONDS)
+                .untilAsserted(
+                        () ->
+                                Assertions.assertFalse(
+                                        hdfsFileExists("/continuous/src/delete-test.bin"),
+                                        "source file should be deleted after checkpoint-gated post-sync commit"));
+
+        cancelContinuousJob(container, jobId, jobFuture);
+        nameNode.execInContainer("bash", "-c", "hdfs dfs -rm -r -f /continuous || true");
+    }
+
+    @TestTemplate
+    @DisabledOnContainer(
+            value = {},
+            type = {EngineType.FLINK, EngineType.SPARK},
+            disabledReason = "Continuous discovery is a long-running job; only run in zeta engine.")
+    public void testHdfsBinaryUpdateModeContinuousDiscoveryPostSyncBackup(TestContainer container)
+            throws IOException, InterruptedException {
+        resetContinuousTestPath();
+        putHdfsFile("/continuous/src/backup-test.bin", "abc");
+
+        String jobId = String.valueOf(JobIdGenerator.newJobId());
+        CompletableFuture<org.testcontainers.containers.Container.ExecResult> jobFuture =
+                CompletableFuture.supplyAsync(
+                        () -> {
+                            try {
+                                return container.executeJob(
+                                        "/hdfs_binary_update_distcp_continuous_post_sync_backup.conf",
+                                        jobId);
+                            } catch (Exception e) {
+                                throw new RuntimeException(e);
+                            }
+                        });
+
+        Awaitility.await()
+                .atMost(60, TimeUnit.SECONDS)
+                .untilAsserted(
+                        () ->
+                                Assertions.assertEquals(
+                                        "abc", readHdfsFile("/continuous/dst/backup-test.bin")));
+
+        Awaitility.await()
+                .atMost(60, TimeUnit.SECONDS)
+                .untilAsserted(
+                        () ->
+                                Assertions.assertFalse(
+                                        hdfsFileExists("/continuous/src/backup-test.bin"),
+                                        "source file should be moved from source path after backup commit"));
+
+        Awaitility.await()
+                .atMost(60, TimeUnit.SECONDS)
+                .untilAsserted(
+                        () ->
+                                Assertions.assertTrue(
+                                        countHdfsFilesByRegex(
+                                                        "/continuous/backup",
+                                                        "/backup-test\\.bin\\.v")
+                                                > 0,
+                                        "backup target should contain version-suffixed file"));
+
+        cancelContinuousJob(container, jobId, jobFuture);
+        nameNode.execInContainer("bash", "-c", "hdfs dfs -rm -r -f /continuous || true");
+    }
+
+    @TestTemplate
+    @DisabledOnContainer(
+            value = {},
+            type = {EngineType.FLINK, EngineType.SPARK},
+            disabledReason = "Continuous discovery is a long-running job; only run in zeta engine.")
+    public void testHdfsContinuousBackupRetentionCleanup(TestContainer container)
+            throws IOException, InterruptedException {
+        resetContinuousTestPath();
+        putHdfsFile("/continuous/backup/retention-old.bin.v3_123456", "abc");
+
+        String jobId = String.valueOf(JobIdGenerator.newJobId());
+        CompletableFuture<org.testcontainers.containers.Container.ExecResult> jobFuture =
+                CompletableFuture.supplyAsync(
+                        () -> {
+                            try {
+                                return container.executeJob(
+                                        "/hdfs_binary_update_distcp_continuous_post_sync_backup_retention.conf",
+                                        jobId);
+                            } catch (Exception e) {
+                                throw new RuntimeException(e);
+                            }
+                        });
+
+        Awaitility.await()
+                .atMost(90, TimeUnit.SECONDS)
+                .untilAsserted(
+                        () ->
+                                Assertions.assertFalse(
+                                        hdfsFileExists(
+                                                "/continuous/backup/retention-old.bin.v3_123456"),
+                                        "retention should remove expired backup files"));
 
+        cancelContinuousJob(container, jobId, jobFuture);
         nameNode.execInContainer("bash", "-c", "hdfs dfs -rm -r -f /continuous || true");
     }
 
@@ -397,7 +517,8 @@ public class HdfsFileIT extends TestSuiteBase implements TestResource {
                         "-p",
                         "/continuous/src",
                         "/continuous/dst",
-                        "/continuous/tmp");
+                        "/continuous/tmp",
+                        "/continuous/backup");
         Assertions.assertEquals(0, mkdirResult.getExitCode());
     }
 
@@ -476,4 +597,59 @@ public class HdfsFileIT extends TestSuiteBase implements TestResource {
         Assertions.assertEquals(0, statResult.getExitCode());
         return Long.parseLong(statResult.getStdout().trim());
     }
+
+    private boolean hdfsFileExists(String hdfsPath) throws IOException, InterruptedException {
+        org.testcontainers.containers.Container.ExecResult result =
+                nameNode.execInContainer(
+                        "bash", "-c", "hdfs dfs -test -e " + hdfsPath + "; echo $?");
+        Assertions.assertEquals(0, result.getExitCode());
+        return "0".equals(result.getStdout().trim());
+    }
+
+    private long countHdfsFilesByRegex(String directoryPath, String pathRegex)
+            throws IOException, InterruptedException {
+        String command =
+                "if hdfs dfs -test -d "
+                        + directoryPath
+                        + "; then hdfs dfs -ls -R "
+                        + directoryPath
+                        + " 2>/dev/null | awk '{print $8}' | grep -E '"
+                        + pathRegex
+                        + "' | wc -l; else echo 0; fi";
+        org.testcontainers.containers.Container.ExecResult result =
+                nameNode.execInContainer("bash", "-c", command);
+        Assertions.assertEquals(0, result.getExitCode());
+        return Long.parseLong(result.getStdout().trim());
+    }
+
+    private long countHdfsAllFiles(String directoryPath) throws IOException, InterruptedException {
+        String command =
+                "if hdfs dfs -test -d "
+                        + directoryPath
+                        + "; then hdfs dfs -ls -R "
+                        + directoryPath
+                        + " 2>/dev/null | grep -c '^-'; else echo 0; fi";
+        org.testcontainers.containers.Container.ExecResult result =
+                nameNode.execInContainer("bash", "-c", command);
+        Assertions.assertEquals(0, result.getExitCode());
+        return Long.parseLong(result.getStdout().trim());
+    }
+
+    private void cancelContinuousJob(
+            TestContainer container,
+            String jobId,
+            CompletableFuture<org.testcontainers.containers.Container.ExecResult> jobFuture)
+            throws IOException, InterruptedException {
+        org.testcontainers.containers.Container.ExecResult cancelResult =
+                container.cancelJob(jobId);
+        Assertions.assertEquals(0, cancelResult.getExitCode(), cancelResult.getStderr());
+
+        org.testcontainers.containers.Container.ExecResult execResult;
+        try {
+            execResult = jobFuture.get(120, TimeUnit.SECONDS);
+        } catch (Exception e) {
+            throw new RuntimeException("Wait continuous job exit failed.", e);
+        }
+        Assertions.assertEquals(0, execResult.getExitCode(), execResult.getStderr());
+    }
 }
diff --git a/seatunnel-e2e/seatunnel-connector-v2-e2e/connector-file-ftp-e2e/src/test/resources/text/ftp_binary_update_distcp_continuous_non_recursive.conf b/seatunnel-e2e/seatunnel-connector-v2-e2e/connector-file-hadoop-e2e/src/test/resources/hdfs_binary_update_distcp_continuous_post_sync_backup.conf
similarity index 71%
copy from seatunnel-e2e/seatunnel-connector-v2-e2e/connector-file-ftp-e2e/src/test/resources/text/ftp_binary_update_distcp_continuous_non_recursive.conf
copy to seatunnel-e2e/seatunnel-connector-v2-e2e/connector-file-hadoop-e2e/src/test/resources/hdfs_binary_update_distcp_continuous_post_sync_backup.conf
index 3d88995203..426f28d084 100644
--- a/seatunnel-e2e/seatunnel-connector-v2-e2e/connector-file-ftp-e2e/src/test/resources/text/ftp_binary_update_distcp_continuous_non_recursive.conf
+++ b/seatunnel-e2e/seatunnel-connector-v2-e2e/connector-file-hadoop-e2e/src/test/resources/hdfs_binary_update_distcp_continuous_post_sync_backup.conf
@@ -22,13 +22,9 @@ env {
 }
 
 source {
-  FtpFile {
-    host = "ftp"
-    port = 21
-    user = seatunnel
-    password = pass
-
-    path = "/tmp/seatunnel/continuous/src"
+  HdfsFile {
+    fs.defaultFS = "hdfs://namenode1:9000"
+    path = "/continuous/src"
     file_format_type = "binary"
 
     discovery_mode = "continuous"
@@ -36,22 +32,29 @@ source {
     start_mode = "earliest"
 
     sync_mode = "update"
-    target_path = "/tmp/seatunnel/continuous/dst"
+    target_path = "/continuous/dst"
     update_strategy = "distcp"
     compare_mode = "len_mtime"
-    recursive_file_scan = false
+
+    post_sync_action = "backup"
+    backup_path = "/continuous/backup"
+
+    hadoop_conf = {
+      "dfs.replication" = 1
+    }
   }
 }
 
 sink {
-  FtpFile {
-    host = "ftp"
-    port = 21
-    user = seatunnel
-    password = pass
-
-    path = "/tmp/seatunnel/continuous/dst"
-    tmp_path = "/tmp/seatunnel/continuous/tmp"
+  HdfsFile {
+    fs.defaultFS = "hdfs://namenode1:9000"
+    path = "/continuous/dst"
+    tmp_path = "/continuous/tmp"
     file_format_type = "binary"
+    data_save_mode = "APPEND_DATA"
+
+    hadoop_conf = {
+      "dfs.replication" = 1
+    }
   }
 }
diff --git a/seatunnel-e2e/seatunnel-connector-v2-e2e/connector-file-ftp-e2e/src/test/resources/text/ftp_binary_update_distcp_continuous_non_recursive.conf b/seatunnel-e2e/seatunnel-connector-v2-e2e/connector-file-hadoop-e2e/src/test/resources/hdfs_binary_update_distcp_continuous_post_sync_backup_retention.conf
similarity index 68%
copy from seatunnel-e2e/seatunnel-connector-v2-e2e/connector-file-ftp-e2e/src/test/resources/text/ftp_binary_update_distcp_continuous_non_recursive.conf
copy to seatunnel-e2e/seatunnel-connector-v2-e2e/connector-file-hadoop-e2e/src/test/resources/hdfs_binary_update_distcp_continuous_post_sync_backup_retention.conf
index 3d88995203..0577ceaf3c 100644
--- a/seatunnel-e2e/seatunnel-connector-v2-e2e/connector-file-ftp-e2e/src/test/resources/text/ftp_binary_update_distcp_continuous_non_recursive.conf
+++ b/seatunnel-e2e/seatunnel-connector-v2-e2e/connector-file-hadoop-e2e/src/test/resources/hdfs_binary_update_distcp_continuous_post_sync_backup_retention.conf
@@ -22,13 +22,9 @@ env {
 }
 
 source {
-  FtpFile {
-    host = "ftp"
-    port = 21
-    user = seatunnel
-    password = pass
-
-    path = "/tmp/seatunnel/continuous/src"
+  HdfsFile {
+    fs.defaultFS = "hdfs://namenode1:9000"
+    path = "/continuous/src"
     file_format_type = "binary"
 
     discovery_mode = "continuous"
@@ -36,22 +32,31 @@ source {
     start_mode = "earliest"
 
     sync_mode = "update"
-    target_path = "/tmp/seatunnel/continuous/dst"
+    target_path = "/continuous/dst"
     update_strategy = "distcp"
     compare_mode = "len_mtime"
-    recursive_file_scan = false
+
+    post_sync_action = "backup"
+    backup_path = "/continuous/backup"
+    retention_max_age = "1S"
+    retention_check_interval = "1S"
+
+    hadoop_conf = {
+      "dfs.replication" = 1
+    }
   }
 }
 
 sink {
-  FtpFile {
-    host = "ftp"
-    port = 21
-    user = seatunnel
-    password = pass
-
-    path = "/tmp/seatunnel/continuous/dst"
-    tmp_path = "/tmp/seatunnel/continuous/tmp"
+  HdfsFile {
+    fs.defaultFS = "hdfs://namenode1:9000"
+    path = "/continuous/dst"
+    tmp_path = "/continuous/tmp"
     file_format_type = "binary"
+    data_save_mode = "APPEND_DATA"
+
+    hadoop_conf = {
+      "dfs.replication" = 1
+    }
   }
 }
diff --git a/seatunnel-e2e/seatunnel-connector-v2-e2e/connector-file-ftp-e2e/src/test/resources/text/ftp_binary_update_distcp_continuous_non_recursive.conf b/seatunnel-e2e/seatunnel-connector-v2-e2e/connector-file-hadoop-e2e/src/test/resources/hdfs_binary_update_distcp_continuous_post_sync_delete.conf
similarity index 73%
copy from seatunnel-e2e/seatunnel-connector-v2-e2e/connector-file-ftp-e2e/src/test/resources/text/ftp_binary_update_distcp_continuous_non_recursive.conf
copy to seatunnel-e2e/seatunnel-connector-v2-e2e/connector-file-hadoop-e2e/src/test/resources/hdfs_binary_update_distcp_continuous_post_sync_delete.conf
index 3d88995203..65e5dc148b 100644
--- a/seatunnel-e2e/seatunnel-connector-v2-e2e/connector-file-ftp-e2e/src/test/resources/text/ftp_binary_update_distcp_continuous_non_recursive.conf
+++ b/seatunnel-e2e/seatunnel-connector-v2-e2e/connector-file-hadoop-e2e/src/test/resources/hdfs_binary_update_distcp_continuous_post_sync_delete.conf
@@ -22,13 +22,9 @@ env {
 }
 
 source {
-  FtpFile {
-    host = "ftp"
-    port = 21
-    user = seatunnel
-    password = pass
-
-    path = "/tmp/seatunnel/continuous/src"
+  HdfsFile {
+    fs.defaultFS = "hdfs://namenode1:9000"
+    path = "/continuous/src"
     file_format_type = "binary"
 
     discovery_mode = "continuous"
@@ -36,22 +32,28 @@ source {
     start_mode = "earliest"
 
     sync_mode = "update"
-    target_path = "/tmp/seatunnel/continuous/dst"
+    target_path = "/continuous/dst"
     update_strategy = "distcp"
     compare_mode = "len_mtime"
-    recursive_file_scan = false
+
+    post_sync_action = "delete"
+
+    hadoop_conf = {
+      "dfs.replication" = 1
+    }
   }
 }
 
 sink {
-  FtpFile {
-    host = "ftp"
-    port = 21
-    user = seatunnel
-    password = pass
-
-    path = "/tmp/seatunnel/continuous/dst"
-    tmp_path = "/tmp/seatunnel/continuous/tmp"
+  HdfsFile {
+    fs.defaultFS = "hdfs://namenode1:9000"
+    path = "/continuous/dst"
+    tmp_path = "/continuous/tmp"
     file_format_type = "binary"
+    data_save_mode = "APPEND_DATA"
+
+    hadoop_conf = {
+      "dfs.replication" = 1
+    }
   }
 }
diff --git a/seatunnel-e2e/seatunnel-connector-v2-e2e/connector-file-local-e2e/src/test/java/org/apache/seatunnel/e2e/connector/file/local/LocalFileIT.java b/seatunnel-e2e/seatunnel-connector-v2-e2e/connector-file-local-e2e/src/test/java/org/apache/seatunnel/e2e/connector/file/local/LocalFileIT.java
index 81fab333d5..80864b1ada 100644
--- a/seatunnel-e2e/seatunnel-connector-v2-e2e/connector-file-local-e2e/src/test/java/org/apache/seatunnel/e2e/connector/file/local/LocalFileIT.java
+++ b/seatunnel-e2e/seatunnel-connector-v2-e2e/connector-file-local-e2e/src/test/java/org/apache/seatunnel/e2e/connector/file/local/LocalFileIT.java
@@ -607,17 +607,148 @@ public class LocalFileIT extends TestSuiteBase {
         Assertions.assertFalse(
                 isLocalFileExists("/tmp/seatunnel/continuous/dst/subdir/nested.bin"));
 
-        Container.ExecResult cancelResult = container.cancelJob(jobId);
-        Assertions.assertEquals(0, cancelResult.getExitCode(), cancelResult.getStderr());
+        cancelContinuousJob(container, jobId, jobFuture);
+        baseContainer.execInContainer("sh", "-c", "rm -rf /tmp/seatunnel/continuous");
+    }
 
-        Container.ExecResult execResult;
-        try {
-            execResult = jobFuture.get(120, TimeUnit.SECONDS);
-        } catch (Exception e) {
-            throw new RuntimeException("Wait continuous job exit failed.", e);
-        }
-        Assertions.assertEquals(0, execResult.getExitCode(), execResult.getStderr());
+    @TestTemplate
+    @DisabledOnContainer(
+            value = {},
+            type = {EngineType.FLINK, EngineType.SPARK},
+            disabledReason =
+                    "Continuous discovery is a long-running job. Local filesystem is not shared between engine master/workers in Flink/Spark E2E.")
+    public void testLocalFileBinaryUpdateModeContinuousDiscoveryPostSyncBackup(
+            TestContainer container) throws IOException, InterruptedException {
+        resetContinuousTestPath();
+        putLocalFile("/tmp/seatunnel/continuous/src/backup-test.bin", "abc");
 
+        String jobId = String.valueOf(JobIdGenerator.newJobId());
+        CompletableFuture<Container.ExecResult> jobFuture =
+                CompletableFuture.supplyAsync(
+                        () -> {
+                            try {
+                                return container.executeJob(
+                                        "/binary/local_file_binary_update_distcp_continuous_post_sync_backup.conf",
+                                        jobId);
+                            } catch (Exception e) {
+                                throw new RuntimeException(e);
+                            }
+                        });
+
+        Awaitility.await()
+                .atMost(60, TimeUnit.SECONDS)
+                .untilAsserted(
+                        () ->
+                                Assertions.assertEquals(
+                                        "abc",
+                                        readLocalFile(
+                                                "/tmp/seatunnel/continuous/dst/backup-test.bin")));
+
+        Awaitility.await()
+                .atMost(60, TimeUnit.SECONDS)
+                .untilAsserted(
+                        () ->
+                                Assertions.assertFalse(
+                                        localFileExists(
+                                                "/tmp/seatunnel/continuous/src/backup-test.bin"),
+                                        "source file should be moved from source path after backup commit"));
+
+        Awaitility.await()
+                .atMost(60, TimeUnit.SECONDS)
+                .untilAsserted(
+                        () ->
+                                Assertions.assertTrue(
+                                        countLocalFiles(
+                                                        "/tmp/seatunnel/continuous/backup",
+                                                        "backup-test.bin.v*")
+                                                > 0,
+                                        "backup target should contain version-suffixed file"));
+
+        cancelContinuousJob(container, jobId, jobFuture);
+        baseContainer.execInContainer("sh", "-c", "rm -rf /tmp/seatunnel/continuous");
+    }
+
+    @TestTemplate
+    @DisabledOnContainer(
+            value = {},
+            type = {EngineType.FLINK, EngineType.SPARK},
+            disabledReason =
+                    "Continuous discovery is a long-running job. Local filesystem is not shared between engine master/workers in Flink/Spark E2E.")
+    public void testLocalFileContinuousBackupRetentionCleanup(TestContainer container)
+            throws IOException, InterruptedException {
+        resetContinuousTestPath();
+        putLocalFile("/tmp/seatunnel/continuous/backup/retention-old.bin.v3_123456", "abc");
+
+        String jobId = String.valueOf(JobIdGenerator.newJobId());
+        CompletableFuture<Container.ExecResult> jobFuture =
+                CompletableFuture.supplyAsync(
+                        () -> {
+                            try {
+                                return container.executeJob(
+                                        "/binary/local_file_binary_update_distcp_continuous_post_sync_backup_retention.conf",
+                                        jobId);
+                            } catch (Exception e) {
+                                throw new RuntimeException(e);
+                            }
+                        });
+
+        Awaitility.await()
+                .atMost(90, TimeUnit.SECONDS)
+                .untilAsserted(
+                        () ->
+                                Assertions.assertEquals(
+                                        0L,
+                                        countLocalFiles(
+                                                "/tmp/seatunnel/continuous/backup", "*.bin.v*"),
+                                        "retention should remove expired backup files"));
+
+        cancelContinuousJob(container, jobId, jobFuture);
+        baseContainer.execInContainer("sh", "-c", "rm -rf /tmp/seatunnel/continuous");
+    }
+
+    @TestTemplate
+    @DisabledOnContainer(
+            value = {},
+            type = {EngineType.FLINK, EngineType.SPARK},
+            disabledReason =
+                    "Continuous discovery is a long-running job. Local filesystem is not shared between engine master/workers in Flink/Spark E2E.")
+    public void testLocalFileBinaryUpdateModeContinuousDiscoveryPostSyncDelete(
+            TestContainer container) throws IOException, InterruptedException {
+        resetContinuousTestPath();
+        putLocalFile("/tmp/seatunnel/continuous/src/delete-test.bin", "abc");
+
+        String jobId = String.valueOf(JobIdGenerator.newJobId());
+        CompletableFuture<Container.ExecResult> jobFuture =
+                CompletableFuture.supplyAsync(
+                        () -> {
+                            try {
+                                return container.executeJob(
+                                        "/binary/local_file_binary_update_distcp_continuous_post_sync_delete.conf",
+                                        jobId);
+                            } catch (Exception e) {
+                                throw new RuntimeException(e);
+                            }
+                        });
+
+        Awaitility.await()
+                .atMost(60, TimeUnit.SECONDS)
+                .untilAsserted(
+                        () ->
+                                Assertions.assertEquals(
+                                        "abc",
+                                        readLocalFile(
+                                                "/tmp/seatunnel/continuous/dst/delete-test.bin")));
+
+        Awaitility.await()
+                .atMost(60, TimeUnit.SECONDS)
+                .untilAsserted(
+                        () ->
+                                Assertions.assertFalse(
+                                        localFileExists(
+                                                "/tmp/seatunnel/continuous/src/delete-test.bin"),
+                                        "source file should be deleted after checkpoint-gated post-sync commit"));
+
+        cancelContinuousJob(container, jobId, jobFuture);
         baseContainer.execInContainer("sh", "-c", "rm -rf /tmp/seatunnel/continuous");
     }
 
@@ -750,7 +881,7 @@ public class LocalFileIT extends TestSuiteBase {
                 baseContainer.execInContainer(
                         "sh",
                         "-c",
-                        "rm -rf /tmp/seatunnel/continuous && mkdir -p /tmp/seatunnel/continuous/src /tmp/seatunnel/continuous/dst /tmp/seatunnel/continuous/tmp");
+                        "rm -rf /tmp/seatunnel/continuous && mkdir -p /tmp/seatunnel/continuous/src /tmp/seatunnel/continuous/dst /tmp/seatunnel/continuous/tmp /tmp/seatunnel/continuous/backup");
         Assertions.assertEquals(0, result.getExitCode(), result.getStderr());
     }
 
@@ -791,6 +922,46 @@ public class LocalFileIT extends TestSuiteBase {
         return Long.parseLong(result.getStdout().trim());
     }
 
+    private boolean localFileExists(String filePath) throws IOException, InterruptedException {
+        Container.ExecResult result =
+                baseContainer.execInContainer(
+                        "sh", "-c", "[ -f '" + filePath + "' ] && echo 1 || echo 0");
+        Assertions.assertEquals(0, result.getExitCode(), result.getStderr());
+        return "1".equals(result.getStdout().trim());
+    }
+
+    private long countLocalFiles(String directoryPath, String fileNamePattern)
+            throws IOException, InterruptedException {
+        String command =
+                "if [ -d '"
+                        + directoryPath
+                        + "' ]; then find '"
+                        + directoryPath
+                        + "' -type f -name '"
+                        + fileNamePattern
+                        + "' | wc -l; else echo 0; fi";
+        Container.ExecResult result = baseContainer.execInContainer("sh", "-c", command);
+        Assertions.assertEquals(0, result.getExitCode(), result.getStderr());
+        return Long.parseLong(result.getStdout().trim());
+    }
+
+    private void cancelContinuousJob(
+            TestContainer container,
+            String jobId,
+            CompletableFuture<Container.ExecResult> jobFuture)
+            throws IOException, InterruptedException {
+        Container.ExecResult cancelResult = container.cancelJob(jobId);
+        Assertions.assertEquals(0, cancelResult.getExitCode(), cancelResult.getStderr());
+
+        Container.ExecResult execResult;
+        try {
+            execResult = jobFuture.get(120, TimeUnit.SECONDS);
+        } catch (Exception e) {
+            throw new RuntimeException("Wait continuous job exit failed.", e);
+        }
+        Assertions.assertEquals(0, execResult.getExitCode(), execResult.getStderr());
+    }
+
     private Path convertToLzoFile(File file) throws IOException {
         LzopCodec lzo = new LzopCodec();
         Path path = Paths.get(file.getAbsolutePath() + ".lzo");
diff --git a/seatunnel-e2e/seatunnel-connector-v2-e2e/connector-file-ftp-e2e/src/test/resources/text/ftp_binary_update_distcp_continuous.conf b/seatunnel-e2e/seatunnel-connector-v2-e2e/connector-file-local-e2e/src/test/resources/binary/local_file_binary_update_distcp_continuous_post_sync_backup.conf
similarity index 88%
copy from seatunnel-e2e/seatunnel-connector-v2-e2e/connector-file-ftp-e2e/src/test/resources/text/ftp_binary_update_distcp_continuous.conf
copy to seatunnel-e2e/seatunnel-connector-v2-e2e/connector-file-local-e2e/src/test/resources/binary/local_file_binary_update_distcp_continuous_post_sync_backup.conf
index 8c1d0c3745..3571e5bb0d 100644
--- a/seatunnel-e2e/seatunnel-connector-v2-e2e/connector-file-ftp-e2e/src/test/resources/text/ftp_binary_update_distcp_continuous.conf
+++ b/seatunnel-e2e/seatunnel-connector-v2-e2e/connector-file-local-e2e/src/test/resources/binary/local_file_binary_update_distcp_continuous_post_sync_backup.conf
@@ -22,12 +22,7 @@ env {
 }
 
 source {
-  FtpFile {
-    host = "ftp"
-    port = 21
-    user = seatunnel
-    password = pass
-
+  LocalFile {
     path = "/tmp/seatunnel/continuous/src"
     file_format_type = "binary"
 
@@ -39,16 +34,14 @@ source {
     target_path = "/tmp/seatunnel/continuous/dst"
     update_strategy = "distcp"
     compare_mode = "len_mtime"
+
+    post_sync_action = "backup"
+    backup_path = "/tmp/seatunnel/continuous/backup"
   }
 }
 
 sink {
-  FtpFile {
-    host = "ftp"
-    port = 21
-    user = seatunnel
-    password = pass
-
+  LocalFile {
     path = "/tmp/seatunnel/continuous/dst"
     tmp_path = "/tmp/seatunnel/continuous/tmp"
     file_format_type = "binary"
diff --git a/seatunnel-e2e/seatunnel-connector-v2-e2e/connector-file-ftp-e2e/src/test/resources/text/ftp_binary_update_distcp_continuous.conf b/seatunnel-e2e/seatunnel-connector-v2-e2e/connector-file-local-e2e/src/test/resources/binary/local_file_binary_update_distcp_continuous_post_sync_backup_retention.conf
similarity index 88%
copy from seatunnel-e2e/seatunnel-connector-v2-e2e/connector-file-ftp-e2e/src/test/resources/text/ftp_binary_update_distcp_continuous.conf
copy to seatunnel-e2e/seatunnel-connector-v2-e2e/connector-file-local-e2e/src/test/resources/binary/local_file_binary_update_distcp_continuous_post_sync_backup_retention.conf
index 8c1d0c3745..751f0a1cea 100644
--- a/seatunnel-e2e/seatunnel-connector-v2-e2e/connector-file-ftp-e2e/src/test/resources/text/ftp_binary_update_distcp_continuous.conf
+++ b/seatunnel-e2e/seatunnel-connector-v2-e2e/connector-file-local-e2e/src/test/resources/binary/local_file_binary_update_distcp_continuous_post_sync_backup_retention.conf
@@ -22,12 +22,7 @@ env {
 }
 
 source {
-  FtpFile {
-    host = "ftp"
-    port = 21
-    user = seatunnel
-    password = pass
-
+  LocalFile {
     path = "/tmp/seatunnel/continuous/src"
     file_format_type = "binary"
 
@@ -39,16 +34,16 @@ source {
     target_path = "/tmp/seatunnel/continuous/dst"
     update_strategy = "distcp"
     compare_mode = "len_mtime"
+
+    post_sync_action = "backup"
+    backup_path = "/tmp/seatunnel/continuous/backup"
+    retention_max_age = "1S"
+    retention_check_interval = "1S"
   }
 }
 
 sink {
-  FtpFile {
-    host = "ftp"
-    port = 21
-    user = seatunnel
-    password = pass
-
+  LocalFile {
     path = "/tmp/seatunnel/continuous/dst"
     tmp_path = "/tmp/seatunnel/continuous/tmp"
     file_format_type = "binary"
diff --git a/seatunnel-e2e/seatunnel-connector-v2-e2e/connector-file-ftp-e2e/src/test/resources/text/ftp_binary_update_distcp_continuous.conf b/seatunnel-e2e/seatunnel-connector-v2-e2e/connector-file-local-e2e/src/test/resources/binary/local_file_binary_update_distcp_continuous_post_sync_delete.conf
similarity index 88%
copy from seatunnel-e2e/seatunnel-connector-v2-e2e/connector-file-ftp-e2e/src/test/resources/text/ftp_binary_update_distcp_continuous.conf
copy to seatunnel-e2e/seatunnel-connector-v2-e2e/connector-file-local-e2e/src/test/resources/binary/local_file_binary_update_distcp_continuous_post_sync_delete.conf
index 8c1d0c3745..41b3a7b27f 100644
--- a/seatunnel-e2e/seatunnel-connector-v2-e2e/connector-file-ftp-e2e/src/test/resources/text/ftp_binary_update_distcp_continuous.conf
+++ b/seatunnel-e2e/seatunnel-connector-v2-e2e/connector-file-local-e2e/src/test/resources/binary/local_file_binary_update_distcp_continuous_post_sync_delete.conf
@@ -22,12 +22,7 @@ env {
 }
 
 source {
-  FtpFile {
-    host = "ftp"
-    port = 21
-    user = seatunnel
-    password = pass
-
+  LocalFile {
     path = "/tmp/seatunnel/continuous/src"
     file_format_type = "binary"
 
@@ -39,16 +34,13 @@ source {
     target_path = "/tmp/seatunnel/continuous/dst"
     update_strategy = "distcp"
     compare_mode = "len_mtime"
+
+    post_sync_action = "delete"
   }
 }
 
 sink {
-  FtpFile {
-    host = "ftp"
-    port = 21
-    user = seatunnel
-    password = pass
-
+  LocalFile {
     path = "/tmp/seatunnel/continuous/dst"
     tmp_path = "/tmp/seatunnel/continuous/tmp"
     file_format_type = "binary"
diff --git a/seatunnel-e2e/seatunnel-connector-v2-e2e/connector-file-sftp-e2e/src/test/java/org/apache/seatunnel/e2e/connector/file/fstp/SftpFileIT.java b/seatunnel-e2e/seatunnel-connector-v2-e2e/connector-file-sftp-e2e/src/test/java/org/apache/seatunnel/e2e/connector/file/fstp/SftpFileIT.java
index b12ba764fd..f3a76c3dc4 100644
--- a/seatunnel-e2e/seatunnel-connector-v2-e2e/connector-file-sftp-e2e/src/test/java/org/apache/seatunnel/e2e/connector/file/fstp/SftpFileIT.java
+++ b/seatunnel-e2e/seatunnel-connector-v2-e2e/connector-file-sftp-e2e/src/test/java/org/apache/seatunnel/e2e/connector/file/fstp/SftpFileIT.java
@@ -287,11 +287,12 @@ public class SftpFileIT extends TestSuiteBase implements TestResource {
     public void testSftpBinaryUpdateModeContinuousDiscoveryDistcp(TestContainer container)
             throws IOException, InterruptedException {
         resetContinuousTestPath();
+        String jobId = String.valueOf(JobIdGenerator.newJobId());
+        CompletableFuture<Container.ExecResult> jobFuture = null;
         try {
             putSftpFile(SFTP_CONTAINER_HOME + "/tmp/seatunnel/continuous/src/test1.bin", "abc");
 
-            String jobId = String.valueOf(JobIdGenerator.newJobId());
-            CompletableFuture<Container.ExecResult> jobFuture =
+            jobFuture =
                     CompletableFuture.supplyAsync(
                             () -> {
                                 try {
@@ -345,6 +346,7 @@ public class SftpFileIT extends TestSuiteBase implements TestResource {
             Assertions.assertEquals(0, cancelResult.getExitCode(), cancelResult.getStderr());
             waitContinuousJobExit(container, jobId, jobFuture);
         } finally {
+            cancelContinuousJobQuietly(container, jobId, jobFuture);
             deleteFileFromContainer(SFTP_CONTAINER_HOME + "/tmp/seatunnel/continuous");
         }
     }
@@ -357,9 +359,10 @@ public class SftpFileIT extends TestSuiteBase implements TestResource {
     public void testSftpBinaryUpdateModeContinuousDiscoveryWithNonRecursiveScan(
             TestContainer container) throws IOException, InterruptedException {
         resetContinuousTestPath();
+        String jobId = String.valueOf(JobIdGenerator.newJobId());
+        CompletableFuture<Container.ExecResult> jobFuture = null;
         try {
-            String jobId = String.valueOf(JobIdGenerator.newJobId());
-            CompletableFuture<Container.ExecResult> jobFuture =
+            jobFuture =
                     CompletableFuture.supplyAsync(
                             () -> {
                                 try {
@@ -402,6 +405,185 @@ public class SftpFileIT extends TestSuiteBase implements TestResource {
             Assertions.assertEquals(0, cancelResult.getExitCode(), cancelResult.getStderr());
             waitContinuousJobExit(container, jobId, jobFuture);
         } finally {
+            cancelContinuousJobQuietly(container, jobId, jobFuture);
+            deleteFileFromContainer(SFTP_CONTAINER_HOME + "/tmp/seatunnel/continuous");
+        }
+    }
+
+    @TestTemplate
+    @DisabledOnContainer(
+            value = {},
+            type = {EngineType.FLINK, EngineType.SPARK},
+            disabledReason = "Continuous discovery is a long-running job; only run in zeta engine.")
+    public void testSftpBinaryUpdateModeContinuousDiscoveryPostSyncDelete(TestContainer container)
+            throws IOException, InterruptedException {
+        resetContinuousTestPath();
+        String jobId = String.valueOf(JobIdGenerator.newJobId());
+        CompletableFuture<Container.ExecResult> jobFuture = null;
+        try {
+            putSftpFile(
+                    SFTP_CONTAINER_HOME + "/tmp/seatunnel/continuous/src/delete-test.bin", "abc");
+
+            jobFuture =
+                    CompletableFuture.supplyAsync(
+                            () -> {
+                                try {
+                                    return container.executeJob(
+                                            "/text/sftp_binary_update_distcp_continuous_post_sync_delete.conf",
+                                            jobId);
+                                } catch (Exception e) {
+                                    throw new RuntimeException(e);
+                                }
+                            });
+
+            Awaitility.await()
+                    .atMost(120, TimeUnit.SECONDS)
+                    .pollInterval(2, TimeUnit.SECONDS)
+                    .untilAsserted(
+                            () ->
+                                    Assertions.assertEquals(
+                                            "abc",
+                                            readSftpFile(
+                                                    SFTP_CONTAINER_HOME
+                                                            + "/tmp/seatunnel/continuous/dst/delete-test.bin")));
+
+            Awaitility.await()
+                    .atMost(120, TimeUnit.SECONDS)
+                    .pollInterval(2, TimeUnit.SECONDS)
+                    .untilAsserted(
+                            () ->
+                                    Assertions.assertFalse(
+                                            isSftpFileExists(
+                                                    SFTP_CONTAINER_HOME
+                                                            + "/tmp/seatunnel/continuous/src/delete-test.bin"),
+                                            "source file should be deleted after checkpoint-gated post-sync commit"));
+
+            Container.ExecResult cancelResult = container.cancelJob(jobId);
+            Assertions.assertEquals(0, cancelResult.getExitCode(), cancelResult.getStderr());
+            waitContinuousJobExit(container, jobId, jobFuture);
+        } finally {
+            cancelContinuousJobQuietly(container, jobId, jobFuture);
+            deleteFileFromContainer(SFTP_CONTAINER_HOME + "/tmp/seatunnel/continuous");
+        }
+    }
+
+    @TestTemplate
+    @DisabledOnContainer(
+            value = {},
+            type = {EngineType.FLINK, EngineType.SPARK},
+            disabledReason = "Continuous discovery is a long-running job; only run in zeta engine.")
+    public void testSftpBinaryUpdateModeContinuousDiscoveryPostSyncBackup(TestContainer container)
+            throws IOException, InterruptedException {
+        resetContinuousTestPath();
+        String jobId = String.valueOf(JobIdGenerator.newJobId());
+        CompletableFuture<Container.ExecResult> jobFuture = null;
+        try {
+            putSftpFile(
+                    SFTP_CONTAINER_HOME + "/tmp/seatunnel/continuous/src/backup-test.bin", "abc");
+
+            jobFuture =
+                    CompletableFuture.supplyAsync(
+                            () -> {
+                                try {
+                                    return container.executeJob(
+                                            "/text/sftp_binary_update_distcp_continuous_post_sync_backup.conf",
+                                            jobId);
+                                } catch (Exception e) {
+                                    throw new RuntimeException(e);
+                                }
+                            });
+
+            Awaitility.await()
+                    .atMost(120, TimeUnit.SECONDS)
+                    .pollInterval(2, TimeUnit.SECONDS)
+                    .untilAsserted(
+                            () ->
+                                    Assertions.assertEquals(
+                                            "abc",
+                                            readSftpFile(
+                                                    SFTP_CONTAINER_HOME
+                                                            + "/tmp/seatunnel/continuous/dst/backup-test.bin")));
+
+            Awaitility.await()
+                    .atMost(120, TimeUnit.SECONDS)
+                    .pollInterval(2, TimeUnit.SECONDS)
+                    .untilAsserted(
+                            () ->
+                                    Assertions.assertFalse(
+                                            isSftpFileExists(
+                                                    SFTP_CONTAINER_HOME
+                                                            + "/tmp/seatunnel/continuous/src/backup-test.bin"),
+                                            "source file should be moved from source path after backup commit"));
+
+            Awaitility.await()
+                    .atMost(120, TimeUnit.SECONDS)
+                    .pollInterval(2, TimeUnit.SECONDS)
+                    .untilAsserted(
+                            () ->
+                                    Assertions.assertTrue(
+                                            countSftpFilesByNamePattern(
+                                                            SFTP_CONTAINER_HOME
+                                                                    + "/tmp/seatunnel/continuous/backup",
+                                                            "backup-test.bin.v*")
+                                                    > 0,
+                                            "backup target should contain version-suffixed file"));
+
+            Container.ExecResult cancelResult = container.cancelJob(jobId);
+            Assertions.assertEquals(0, cancelResult.getExitCode(), cancelResult.getStderr());
+            waitContinuousJobExit(container, jobId, jobFuture);
+        } finally {
+            cancelContinuousJobQuietly(container, jobId, jobFuture);
+            deleteFileFromContainer(SFTP_CONTAINER_HOME + "/tmp/seatunnel/continuous");
+        }
+    }
+
+    @TestTemplate
+    @DisabledOnContainer(
+            value = {},
+            type = {EngineType.FLINK, EngineType.SPARK},
+            disabledReason = "Continuous discovery is a long-running job; only run in zeta engine.")
+    public void testSftpContinuousBackupRetentionCleanup(TestContainer container)
+            throws IOException, InterruptedException {
+        resetContinuousTestPath();
+        String jobId = String.valueOf(JobIdGenerator.newJobId());
+        CompletableFuture<Container.ExecResult> jobFuture = null;
+        try {
+            String retentionFile =
+                    SFTP_CONTAINER_HOME
+                            + "/tmp/seatunnel/continuous/backup/retention-old.bin.v3_123456";
+            putSftpFile(retentionFile, "abc");
+            setSftpFileMtimeToPast(retentionFile);
+
+            jobFuture =
+                    CompletableFuture.supplyAsync(
+                            () -> {
+                                try {
+                                    return container.executeJob(
+                                            "/text/sftp_binary_update_distcp_continuous_post_sync_backup_retention.conf",
+                                            jobId);
+                                } catch (Exception e) {
+                                    throw new RuntimeException(e);
+                                }
+                            });
+
+            Awaitility.await()
+                    .atMost(120, TimeUnit.SECONDS)
+                    .pollInterval(2, TimeUnit.SECONDS)
+                    .untilAsserted(
+                            () ->
+                                    Assertions.assertEquals(
+                                            0L,
+                                            countSftpFilesByNamePattern(
+                                                    SFTP_CONTAINER_HOME
+                                                            + "/tmp/seatunnel/continuous/backup",
+                                                    "retention-old.bin.v*"),
+                                            "retention should remove expired SeaTunnel backup files"));
+
+            Container.ExecResult cancelResult = container.cancelJob(jobId);
+            Assertions.assertEquals(0, cancelResult.getExitCode(), cancelResult.getStderr());
+            waitContinuousJobExit(container, jobId, jobFuture);
+        } finally {
+            cancelContinuousJobQuietly(container, jobId, jobFuture);
             deleteFileFromContainer(SFTP_CONTAINER_HOME + "/tmp/seatunnel/continuous");
         }
     }
@@ -547,13 +729,13 @@ public class SftpFileIT extends TestSuiteBase implements TestResource {
     private void putSftpFile(String containerPath, String content)
             throws IOException, InterruptedException {
         String command =
-                "mkdir -p $(dirname '"
+                "parent=$(dirname '"
                         + containerPath
-                        + "') && printf '"
+                        + "') && mkdir -p \"$parent\" && printf '"
                         + content
                         + "' > '"
                         + containerPath
-                        + "' && chmod 666 '"
+                        + "' && chmod -R 777 \"$parent\" && chmod 666 '"
                         + containerPath
                         + "'";
         Container.ExecResult putResult = sftpContainer.execInContainer("sh", "-c", command);
@@ -574,6 +756,41 @@ public class SftpFileIT extends TestSuiteBase implements TestResource {
         return result.getExitCode() == 0;
     }
 
+    private void setSftpFileMtimeToPast(String containerPath)
+            throws IOException, InterruptedException {
+        Container.ExecResult result =
+                sftpContainer.execInContainer(
+                        "sh", "-c", "touch -t 202001010000.00 '" + containerPath + "'");
+        Assertions.assertEquals(0, result.getExitCode(), result.getStderr());
+    }
+
+    /**
+     * Best-effort cleanup for assertion failures so one continuous test cannot leak into the next
+     * test's shared SFTP directories.
+     */
+    private void cancelContinuousJobQuietly(
+            TestContainer container,
+            String jobId,
+            CompletableFuture<Container.ExecResult> jobFuture) {
+        if (jobFuture == null || jobFuture.isDone()) {
+            return;
+        }
+        try {
+            String status = container.getJobStatus(jobId);
+            if (!"CANCELED".equals(status)
+                    && !"FINISHED".equals(status)
+                    && !"FAILED".equals(status)) {
+                container.cancelJob(jobId);
+            }
+            Awaitility.await()
+                    .atMost(180, TimeUnit.SECONDS)
+                    .pollInterval(2, TimeUnit.SECONDS)
+                    .until(jobFuture::isDone);
+        } catch (Exception e) {
+            log.warn("Failed to clean up continuous SFTP job {}.", jobId, e);
+        }
+    }
+
     /**
      * Wait for the continuous discovery job to enter the terminal canceled state and for the
      * asynchronous execute call to finish its post-job thread cleanup.
@@ -619,6 +836,23 @@ public class SftpFileIT extends TestSuiteBase implements TestResource {
         return Long.parseLong(result.getStdout().trim());
     }
 
+    private long countSftpFilesByNamePattern(String containerPath, String namePattern)
+            throws IOException, InterruptedException {
+        Container.ExecResult result =
+                sftpContainer.execInContainer(
+                        "sh",
+                        "-c",
+                        "if [ -d '"
+                                + containerPath
+                                + "' ]; then find '"
+                                + containerPath
+                                + "' -type f -name '"
+                                + namePattern
+                                + "' | wc -l; else echo 0; fi");
+        Assertions.assertEquals(0, result.getExitCode(), result.getStderr());
+        return Long.parseLong(result.getStdout().trim());
+    }
+
     @SneakyThrows
     private List<String> getFileListFromContainer(String path) {
         Container.ExecResult result = sftpContainer.execInContainer("sh", "-c", "ls -1 " + path);
diff --git a/seatunnel-e2e/seatunnel-connector-v2-e2e/connector-file-ftp-e2e/src/test/resources/text/ftp_binary_update_distcp_continuous_non_recursive.conf b/seatunnel-e2e/seatunnel-connector-v2-e2e/connector-file-sftp-e2e/src/test/resources/text/sftp_binary_update_distcp_continuous_post_sync_backup.conf
similarity index 69%
copy from seatunnel-e2e/seatunnel-connector-v2-e2e/connector-file-ftp-e2e/src/test/resources/text/ftp_binary_update_distcp_continuous_non_recursive.conf
copy to seatunnel-e2e/seatunnel-connector-v2-e2e/connector-file-sftp-e2e/src/test/resources/text/sftp_binary_update_distcp_continuous_post_sync_backup.conf
index 3d88995203..c593e5dd69 100644
--- a/seatunnel-e2e/seatunnel-connector-v2-e2e/connector-file-ftp-e2e/src/test/resources/text/ftp_binary_update_distcp_continuous_non_recursive.conf
+++ b/seatunnel-e2e/seatunnel-connector-v2-e2e/connector-file-sftp-e2e/src/test/resources/text/sftp_binary_update_distcp_continuous_post_sync_backup.conf
@@ -19,16 +19,23 @@ env {
   parallelism = 1
   job.mode = "STREAMING"
   checkpoint.interval = 5000
+
+  # You can set spark configuration here
+  spark.app.name = "SeaTunnel"
+  spark.executor.instances = 1
+  spark.executor.cores = 1
+  spark.executor.memory = "1g"
+  spark.master = local
 }
 
 source {
-  FtpFile {
-    host = "ftp"
-    port = 21
+  SftpFile {
+    host = "sftp"
+    port = 22
     user = seatunnel
     password = pass
 
-    path = "/tmp/seatunnel/continuous/src"
+    path = "tmp/seatunnel/continuous/src"
     file_format_type = "binary"
 
     discovery_mode = "continuous"
@@ -36,22 +43,24 @@ source {
     start_mode = "earliest"
 
     sync_mode = "update"
-    target_path = "/tmp/seatunnel/continuous/dst"
+    target_path = "tmp/seatunnel/continuous/dst"
     update_strategy = "distcp"
     compare_mode = "len_mtime"
-    recursive_file_scan = false
+
+    post_sync_action = "backup"
+    backup_path = "tmp/seatunnel/continuous/backup"
   }
 }
 
 sink {
-  FtpFile {
-    host = "ftp"
-    port = 21
+  SftpFile {
+    host = "sftp"
+    port = 22
     user = seatunnel
     password = pass
 
-    path = "/tmp/seatunnel/continuous/dst"
-    tmp_path = "/tmp/seatunnel/continuous/tmp"
+    path = "tmp/seatunnel/continuous/dst"
+    tmp_path = "tmp/seatunnel/continuous/tmp"
     file_format_type = "binary"
   }
 }
diff --git a/seatunnel-e2e/seatunnel-connector-v2-e2e/connector-file-ftp-e2e/src/test/resources/text/ftp_binary_update_distcp_continuous_non_recursive.conf b/seatunnel-e2e/seatunnel-connector-v2-e2e/connector-file-sftp-e2e/src/test/resources/text/sftp_binary_update_distcp_continuous_post_sync_backup_retention.conf
similarity index 66%
copy from seatunnel-e2e/seatunnel-connector-v2-e2e/connector-file-ftp-e2e/src/test/resources/text/ftp_binary_update_distcp_continuous_non_recursive.conf
copy to seatunnel-e2e/seatunnel-connector-v2-e2e/connector-file-sftp-e2e/src/test/resources/text/sftp_binary_update_distcp_continuous_post_sync_backup_retention.conf
index 3d88995203..86c816094c 100644
--- a/seatunnel-e2e/seatunnel-connector-v2-e2e/connector-file-ftp-e2e/src/test/resources/text/ftp_binary_update_distcp_continuous_non_recursive.conf
+++ b/seatunnel-e2e/seatunnel-connector-v2-e2e/connector-file-sftp-e2e/src/test/resources/text/sftp_binary_update_distcp_continuous_post_sync_backup_retention.conf
@@ -19,16 +19,23 @@ env {
   parallelism = 1
   job.mode = "STREAMING"
   checkpoint.interval = 5000
+
+  # You can set spark configuration here
+  spark.app.name = "SeaTunnel"
+  spark.executor.instances = 1
+  spark.executor.cores = 1
+  spark.executor.memory = "1g"
+  spark.master = local
 }
 
 source {
-  FtpFile {
-    host = "ftp"
-    port = 21
+  SftpFile {
+    host = "sftp"
+    port = 22
     user = seatunnel
     password = pass
 
-    path = "/tmp/seatunnel/continuous/src"
+    path = "tmp/seatunnel/continuous/src"
     file_format_type = "binary"
 
     discovery_mode = "continuous"
@@ -36,22 +43,26 @@ source {
     start_mode = "earliest"
 
     sync_mode = "update"
-    target_path = "/tmp/seatunnel/continuous/dst"
+    target_path = "tmp/seatunnel/continuous/dst"
     update_strategy = "distcp"
     compare_mode = "len_mtime"
-    recursive_file_scan = false
+
+    post_sync_action = "backup"
+    backup_path = "tmp/seatunnel/continuous/backup"
+    retention_max_age = "1S"
+    retention_check_interval = "1S"
   }
 }
 
 sink {
-  FtpFile {
-    host = "ftp"
-    port = 21
+  SftpFile {
+    host = "sftp"
+    port = 22
     user = seatunnel
     password = pass
 
-    path = "/tmp/seatunnel/continuous/dst"
-    tmp_path = "/tmp/seatunnel/continuous/tmp"
+    path = "tmp/seatunnel/continuous/dst"
+    tmp_path = "tmp/seatunnel/continuous/tmp"
     file_format_type = "binary"
   }
 }
diff --git a/seatunnel-e2e/seatunnel-connector-v2-e2e/connector-file-ftp-e2e/src/test/resources/text/ftp_binary_update_distcp_continuous_non_recursive.conf b/seatunnel-e2e/seatunnel-connector-v2-e2e/connector-file-sftp-e2e/src/test/resources/text/sftp_binary_update_distcp_continuous_post_sync_delete.conf
similarity index 71%
copy from seatunnel-e2e/seatunnel-connector-v2-e2e/connector-file-ftp-e2e/src/test/resources/text/ftp_binary_update_distcp_continuous_non_recursive.conf
copy to seatunnel-e2e/seatunnel-connector-v2-e2e/connector-file-sftp-e2e/src/test/resources/text/sftp_binary_update_distcp_continuous_post_sync_delete.conf
index 3d88995203..b5d8ee6601 100644
--- a/seatunnel-e2e/seatunnel-connector-v2-e2e/connector-file-ftp-e2e/src/test/resources/text/ftp_binary_update_distcp_continuous_non_recursive.conf
+++ b/seatunnel-e2e/seatunnel-connector-v2-e2e/connector-file-sftp-e2e/src/test/resources/text/sftp_binary_update_distcp_continuous_post_sync_delete.conf
@@ -19,16 +19,23 @@ env {
   parallelism = 1
   job.mode = "STREAMING"
   checkpoint.interval = 5000
+
+  # You can set spark configuration here
+  spark.app.name = "SeaTunnel"
+  spark.executor.instances = 1
+  spark.executor.cores = 1
+  spark.executor.memory = "1g"
+  spark.master = local
 }
 
 source {
-  FtpFile {
-    host = "ftp"
-    port = 21
+  SftpFile {
+    host = "sftp"
+    port = 22
     user = seatunnel
     password = pass
 
-    path = "/tmp/seatunnel/continuous/src"
+    path = "tmp/seatunnel/continuous/src"
     file_format_type = "binary"
 
     discovery_mode = "continuous"
@@ -36,22 +43,23 @@ source {
     start_mode = "earliest"
 
     sync_mode = "update"
-    target_path = "/tmp/seatunnel/continuous/dst"
+    target_path = "tmp/seatunnel/continuous/dst"
     update_strategy = "distcp"
     compare_mode = "len_mtime"
-    recursive_file_scan = false
+
+    post_sync_action = "delete"
   }
 }
 
 sink {
-  FtpFile {
-    host = "ftp"
-    port = 21
+  SftpFile {
+    host = "sftp"
+    port = 22
     user = seatunnel
     password = pass
 
-    path = "/tmp/seatunnel/continuous/dst"
-    tmp_path = "/tmp/seatunnel/continuous/tmp"
+    path = "tmp/seatunnel/continuous/dst"
+    tmp_path = "tmp/seatunnel/continuous/tmp"
     file_format_type = "binary"
   }
 }