Copy .sql files from the server to my pc by means of a batch

0

I have a scheduled task that makes BackUps of my database daily on the server and on my pc I have a bath that runs at a certain time by copying the sql files that are generated on the server and copying them on my pc. With the following code I make the copy per cmd of the server to my pc:

Command that I run on my pc:

xcopy /y \Ip donde estan los archivos\c$\xampp\htdocs\Carpeta de origen\Sub 
Carpeta\cron\sqlBackup\*.sql C:\xampp\htdocs\Carpeta de destino

Command detail:

  • Where are the files on the server that are copied:

    • \ Ip where the files are \ c $ \ xampp \ htdocs \ Source folder \ Sub Folder \ cron \ sqlBackup * .sql *
  • Destination folder on my pc where they are pasted / saved:

    • C: \ xampp \ htdocs \ Destination folder

How can I do it in reverse and run it from the server in the same task that backups do, that is, access the folder where they are in the server copy and paste them into my pc through the ip. I guess it would be like the above command but it would have to be the other way around but it does not work out.

    
asked by Juan 12.11.2018 в 18:46
source

1 answer

0

Solved:

xcopy /y C:\xampp\htdocs\carpeta\subCarpeta\cron\sqlBackup\*.sql 
\Mi Ip\c$\xampp\htdocs\carpeta

It was just to turn the Ip and put the corresponding.

    
answered by 12.11.2018 / 22:35
source