Welcome! Log In


[CMD] Backup FTP with WGET.EXE
first ... install wget for windows with setup: http://gnuwin32.sourceforge.net/packages/wget.htm


@echo off
rem Date and Time
for /f "tokens=1-3 delims=/- " %%a in ('date /t') do set XDate=%%a-%%b-%%c
echo %XDate%

cd D:\WEB\
md D:\WEB\SAUVEGARDE
cd D:\WEB\SAUVEGARDE
D:

"C:\Program Files (x86)\GnuWin32\bin\WGET.exe" -r ftp://IDENTIFIANT:ASSWORD@ftp.monftp.fr/www/*

cd..

rename D:\WEB\SAUVEGARDE SAUVEGARDE-%XDate%

exit



Edited 2 time(s). Last edit at 08/12/2013 04:40PM by iznogoud.
Backup using wget et 7zip to archive:



@echo off
rem Date and Time
for /f "tokens=1-3 delims=/- " %%a in ('date /t') do set XDate=%%a-%%b-%%c
echo %XDate%

cd D:\PHP\WEB\SAUVEGARDE
D:

"C:\Program Files (x86)\GnuWin32\bin\WGET.exe" -N -r -o D:\PHP\WEB\SAUVEGARDE-%XDate%.log ftp://identity:assword@ftp.domaine.fr/www/*

cd..
cd D:\PHP\WEB
D:

"C:\Program Files\7-Zip\7z.exe" a SAUVEGARDE-%XDate%.7z SAUVEGARDE\

exit



Edited 1 time(s). Last edit at 08/16/2013 09:58AM by iznogoud.
Sorry, only registered users may post in this forum.

Click here to login