I used bash command but it give error command not found
#! /bin/bash
$sourcePath = "\\cloud server\shared\folder"
$destinationPath = "E:\backup"
robocopy $sourcePath $destinationPath /E /Z /COPYALL /R:3 /W:2
Write-Host "Backup completed!"
What should I do? Please suggest.
Jithu ThomasPosted Feb 28, 2024, 11:37 AM
Use /Z or /ZB option:
/Zor/ZB: Uses restartable mode. If the connection is lost during the copy, it will resume from where it left off. This can be beneficial for large transfers over a network.Increase the number of threads with /MT:
/MT[:n]: Specifies the number of threads to use (1-128). Increasing the number of threads can improve copy performance. Experiment with different values to find the optimal setting for your network.Use /IPG:
/IPG:n: Inter-Packet Gap (ms), introduces a delay between packets to reduce the impact on the network. Experiment with different values.Check Network Bandwidth and Latency:
Consider Compression:
Try this example.
Shweta VarshneyPosted Feb 28, 2024, 11:06 AM
I tried this powershell on server and add my disk to remote local resource -
robocopy "C:\uploads\test1" "\\tsclient\E\test2" /e /r:0 /w:0 /COPY:DAT /DCOPY:DAT /mt:16
It copied one by one and also takes lot of time approx 19 hours.
I have to copy 3 lakhs + images
Please suggest
Jithu ThomasPosted Feb 22, 2024, 1:00 PM
It looks like you are trying to write a script that uses both Bash and PowerShell commands. However, the script you provided is a mix of Bash and PowerShell syntax, which might be causing the "command not found" error.
Here is the updated version.
I think we discuss this on a different thread.!
https://www.c-sharpcorner.com/forums/about-backup-bulk-images