rsync_to_server
Functions
|
Main function to sync data to remote server using rsync. |
|
Run rsync command with specified parameters. |
- run_rsync(source: str, destination: str, remote_user: str, remote_host: str, port: int | None, maximum_sync_time: int, cancel_event: Event | None = None) bool[source]
Run rsync command with specified parameters.
- Parameters:
source (str) – Local path to sync.
destination (str) – Remote destination path.
remote_user (str) – Username on remote system.
remote_host (str) – Remote hostname or IP.
port (int | None) – SSH port.
maximum_sync_time (int) – Maximum sync time in seconds.
cancel_event (threading.Event | None) – Event to signal cancellation.
- Returns:
True if sync succeeded, False otherwise.
- Return type:
bool
- main(source: str, destination: str, remote_user: str, remote_host: str, port: int | None = None, maximum_sync_time: int = 1200, cancel_event: Event | None = None) None[source]
Main function to sync data to remote server using rsync.
- Parameters:
source (str) – Source directory path.
destination (str) – Destination path on remote system.
remote_user (str) – Username on remote system.
remote_host (str) – Remote hostname or IP.
port (int | None) – SSH port (default: None).
maximum_sync_time (int) – Maximum sync time duration in seconds. Defaults to 1200.
cancel_event (threading.Event | None) – Event to signal cancellation. Defaults to None.