Skip to content

Commit

Permalink
feat: Include harmonised and remove delete feature for ftp-sync (#164)
Browse files Browse the repository at this point in the history
* feat: Include 'harmonised' folder to ftp-sync operation

* fix: Don't delete outstanding files on target
  • Loading branch information
karatugo authored Mar 11, 2024
1 parent 4edfeb6 commit 2a2a8f5
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions ftpSummaryStatsScript/ftp_sync.py
Original file line number Diff line number Diff line change
Expand Up @@ -303,11 +303,9 @@ def rsync_dir(source, dest):
# -v - verbose
# -h - human readable output
# --size-only - only file size is compared, timestamp is ignored
# --delete - delete outstanding files on the target folder
# --exclude=harmonised - excluding harmonised folders
# --exclude=".*" - excluding hidden files
logger.info("Sync {} --> {}".format(source, dest))
subprocess.call(['rsync', '-rpvh', '--chmod=Du=rwx,Dg=rwx,Do=rx,Fu=rw,Fg=rw,Fo=r', '--size-only', '--delete', '--exclude=harmonised', '--exclude=.*', source, dest])
subprocess.call(['rsync', '-rpvh', '--chmod=Du=rwx,Dg=rwx,Do=rx,Fu=rw,Fg=rw,Fo=r', '--size-only', '--exclude=.*', source, dest])
except OSError as e:
logger.error(e)

Expand Down

0 comments on commit 2a2a8f5

Please sign in to comment.