rsync Backup unter Windows mit Hard-Links


@echo off
SET rsync=c:\Programme\cwrsync\bin\rsync
SET lastfile=c:\backup\lastfile.txt
SET destination=/cygdrive/c/backup
SET sourcefiles=/cygdrive/c/backup/filelist.txt
SET logfile=c:\backup\logfile.txt

SET heute=%date:~-4%-%date:~-7,2%-%date:~-10,2%
echo ———————————- >>%logfile%
echo Backup vom %heute% >>%logfile%
IF NOT EXIST %lastfile% GOTO nolast
FOR /F %%i in (%lastfile%) do SET letztes=%%i
echo Letztes Backup am %letztes% >>%logfile%
if „%letztes%“ == „%heute%“ goto update
echo Link Destination >>%logfile%
SET link_opt=–link-dest=%destination%/%letztes%
GOTO cont1

:update
SET link_opt=
echo Update heutiges Backup >>%logfile%
goto cont1

:nolast
SET link_opt=

:cont1
echo %heute% > %lastfile%
%rsync% -arvt %link_opt% –files-from=%sourcefiles% /cygdrive/ %destination%/%heute% >>%logfile%
echo Done >>%logfile%

Rsync

(Damit das funktioniert, muss die Zielplatte Hard Links können, also entweder NTFS sein, oder ein Remotesystem, wo das Filesystem Hard Links kann, FAT geht nicht)

Dieser Beitrag wurde unter Software, Windows veröffentlicht. Setze ein Lesezeichen auf den Permalink.

Schreibe einen Kommentar

Deine E-Mail-Adresse wird nicht veröffentlicht.


Warning: Declaration of sk2_captcha_plugin::output_plugin_UI() should be compatible with sk2_plugin::output_plugin_UI($output_dls = true) in /is/htdocs/wp1153128_S7O04BK1JT/www/blog/wp-content/plugins/SK2/sk2_plugins/sk2_captcha_plugin.php on line 60

Warning: Declaration of sk2_pjw_simpledigest::output_plugin_UI() should be compatible with sk2_plugin::output_plugin_UI($output_dls = true) in /is/htdocs/wp1153128_S7O04BK1JT/www/blog/wp-content/plugins/SK2/sk2_plugins/sk2_pjw_daily_digest_plugin.php on line 210

Warning: Declaration of sk2_rbl_plugin::treat_this($cmt_object) should be compatible with sk2_plugin::treat_this(&$cmt_object) in /is/htdocs/wp1153128_S7O04BK1JT/www/blog/wp-content/plugins/SK2/sk2_plugins/sk2_rbl_plugin.php on line 227

Warning: Declaration of sk2_referrer_check_plugin::output_plugin_UI() should be compatible with sk2_plugin::output_plugin_UI($output_dls = true) in /is/htdocs/wp1153128_S7O04BK1JT/www/blog/wp-content/plugins/SK2/sk2_plugins/sk2_referrer_check_plugin.php on line 70

Warning: Use of undefined constant after - assumed 'after' (this will throw an Error in a future version of PHP) in /is/htdocs/wp1153128_S7O04BK1JT/www/blog/wp-content/plugins/SK2/sk2_core_class.php on line 314

Warning: Use of undefined constant after - assumed 'after' (this will throw an Error in a future version of PHP) in /is/htdocs/wp1153128_S7O04BK1JT/www/blog/wp-content/plugins/SK2/sk2_core_class.php on line 314