rsync icon indicating copy to clipboard operation
rsync copied to clipboard

rsync command faster execution

Open kmuthugtk opened this issue 1 year ago • 1 comments

async def run_rsync(self, source, destination): cmd = f"rsync -a --update --append-verify --inplace --progress --times --itemize-changes --out-format='%i %n %M' rsync://{source} {destination}" logging.info(f"Running command: {cmd}") process = await asyncio.create_subprocess_shell( cmd, stdout=asyncio.subprocess.PIPE, stderr=asyncio.subprocess.PIPE)

        # Read output and error async
        stdout, stderr = await process.communicate()

        output = stdout.decode('utf-8')
        error = stderr.decode('utf-8')

        if process.returncode != 0:
            error_message = process.stderr
            logging.info(f"Rsync failed with error: {error_message}")
        else:
            logging.info(f"Rsync completed and delta: {output} - {datetime.now()}")
            
            

Using this command, I want to execute more faster. But currently its slow

kmuthugtk avatar Jan 07 '25 09:01 kmuthugtk

You need to add more details and format the code using triple backticks

sudhackar avatar Jul 24 '25 07:07 sudhackar