continue copying files in script after error

Advertisement

vitty
Guest

continue copying files in script after error

i have a problem. i need backup files on servers to major server and then backup on tape. i write this script:

option batch on 
option confirm off 
open user@IP 
option transfer binary
get /home c:\zaloha\IP\DATE 
close 
exit

I need continue copying files when is error with any file.
eroor log:

c:\Internet\SSH\ZALOHA>zaloha
batch        on
confirm      off
Inicializace...
Hledání hostitele...
Spojování s hostitelem...
Autentikace...
Using username "user".
Autentikováno.
Příprava...
Čtení vzdáleného adresáře...
Připraveno.
Aktivní spojení: [1] user@IP
transfer     binary
home                      |          0 kB |    0,0 kB/s | binary |   0%
.
.
.
debian                    |          0 kB |  651,0 kB/s | binary |   0%
Kopírování souborů ze vzdáleného adresáře selhalo.
Obecné selhání (server by měl poskytnout popis příčiny chyby).
Kód chyby: 4
Chybové hlášení zaslané serverem: Failure
Kód požadavku: 5
Spojení 'user@IP' uzavřeno.
Žádné otevřené spojení.

or

.
.
.
javakey.1.gz              |          0 kB |  361,0 kB/s | binary |   0%
Nepodařilo se otevřít vzdálený soubor '/etc/alternatives/javakey.1.gz'.
Soubor nebo adresář neexistuje.
Kód chyby: 2
Chybové hlášení zaslané serverem: No such file
Kód požadavku: 3
Pře(r)ušit, (O)pakovat, (P)řeskočit: Přerušit
Spojení 'user@IP' uzavřeno.
Žádné otevřené spojení.

thanx for answer and sorry for my english :twisted: vitty

Pripojuji jeste dotaz v cestine pro snadnejsi pochopeni meho problemu. Kopiruji data ze serveru na hlavni server (z Linuxu na WinXP). Pri prubehu kopirovani se mi prikaz get ukonci s vyse uvedenyma chybama. Potreboval bych, aby skript tyto chyby preskocil a pokracoval dal v kopirovani. Tento skript mi pobezi v noci a sam. Po ukonceni se spusti zalohovani na pasku.

Reply with quote

Advertisement

martin
Site Admin
martin avatar
Joined:
Posts:
29,300
Location:
Prague, Czechia

Re: continue copying files in script after error

There's currently no way how to ignore the errors and continue. You need to avoid copying files that cannot be copied.
_________________
Martin Prikryl

Reply with quote

Guest

Re: continue copying files in script after error

martin wrote:

There's currently no way how to ignore the errors and continue. You need to avoid copying files that cannot be copied.

it's impossible check files before copying. i need daily back-up ahead given folders on few servers and i don't know what is in this folders. when some file is just now in use or in linux one folders reffering on another folder, i don't know, how this file or folder before copying detect and eliminate from copying.

is any idea?

thanx for answer, vitty

Reply with quote

martin
Site Admin
martin avatar
Joined:
Posts:
29,300
Location:
Prague, Czechia

Re: continue copying files in script after error

Anonymous wrote:

it's impossible check files before copying. i need daily back-up ahead given folders on few servers and i don't know what is in this folders. when some file is just now in use or in linux one folders reffering on another folder, i don't know, how this file or folder before copying detect and eliminate from copying.
Have you tried other command-line SFTP client, like PSFTP?
_________________
Martin Prikryl

Reply with quote

Guest

Re: continue copying files in script after error

psftp copy only files. i find program tunnelier by bitvise and then work without errors.

Reply with quote

Advertisement

You can post new topics in this forum