Narzędzia użytkownika

Narzędzia witryny


backup_za_pomocą_winscp_na_ftpa

Backup za pomocą WinSCP na FTPa

Skrypt CMD:

@echo off
echo "Start backup ..."
set datetime=%date% %time:~0,8%
echo Last backup: %datetime% > %USERPROFILE%\Documents\last.txt
set PATH=%PATH%;C:\Program Files (x86)\WinSCP

rem Outlook 2007 i 2010
del %USERPROFILE%\Documents\outlook.reg
reg export "HKEY_CURRENT_USER\Software\Microsoft\Windows NT\CurrentVersion\Windows Messaging Subsystem\Profiles" %USERPROFILE%\Documents\outlook.reg
rem Outlook 2013
del %USERPROFILE%\Documents\outlook.reg
reg export "HKEY_CURRENT_USER\Software\Microsoft\Office\15.0\Outlook\Profiles" %USERPROFILE%\Documents\outlook.reg
rem Windows Mail
del %USERPROFILE%\Documents\windowsMail.reg
del %USERPROFILE%\Documents\windowsLiveContacts.reg
del %USERPROFILE%\Documents\windowsLiveMail.reg
reg export "HKEY_CURRENT_USER\Software\Microsoft\Windows Mail" %USERPROFILE%\Documents\windowsMail.reg
reg export "HKEY_CURRENT_USER\Software\Microsoft\Windows Live Contacts" %USERPROFILE%\Documents\windowsLiveContacts.reg
reg export "HKEY_CURRENT_USER\Software\Microsoft\Windows Live Mail" %USERPROFILE%\Documents\windowsLiveMail.reg

del ftplog.txt
WinSCP.exe /console /script=ftp_mirror.txt /log=ftplog.txt

echo Start: %datetime%
echo End: %date% %time:~0,8%
rem C:\WINDOWS\system32\shutdown.exe -s -f -t 0
rem pause

Plik ftp_mirror.txt:

option batch continue
option confirm off
open ftp://login:pass@1.2.3.4/
synchronize remote -delete %USERPROFILE%\Desktop /Desktop
synchronize remote -delete %USERPROFILE%\Pictures /Pictures
synchronize remote -delete %USERPROFILE%\AppData\Local\Microsoft\Outlook\ /Outlook
synchronize remote -delete %USERPROFILE%\AppData\Roaming\Thunderbird\ /Thunderbird
synchronize remote -delete "%USERPROFILE%\AppData\Local\Microsoft\Windows Live Mail" "/Windows Live Mail"
synchronize remote -delete "%USERPROFILE%\AppData\Local\Microsoft\Windows Mail" "/Windows Mail"
synchronize remote -delete %USERPROFILE%\Documents /Documents
exit
backup_za_pomocą_winscp_na_ftpa.txt · ostatnio zmienione: 2018/08/21 11:28 przez kamil