Sonntag, 24. Juli 2016

rsync

Backup mit Timestamp

rsync -avb --suffix=_`date +%Y%m%d%H%M%S` /home/user/Downloads/rsync/A/ /home/user/Downloads/rsync/B/

Ändert ein File im Startverzeichnis, so wird das im Zielverzeichnis mit einem Zeistempel versehen.

Bsp:
1. Rsync ausführen
1. File 1.txt wird von A nach B kopiert, beide Verzeichnisse haben das identische File 1.txt
2. In Folder A ändert das File 1.txt
3. Rsync ausführen
4. Das File 1.txt wird von A nach B kopiert. das Alte File in B wird mit einem Zeitstempel veresehen.

Backup ohne Timestamp (File wird im Ziel überschrieben)

rsync -av --size-only /home/andy/Downloads/rsync/A/ /home/andy/Downloads/rsync/B/

Webdav mittels Visual-Basic verbinden

VB-Script zum verbinden von Webdav 

NET USE gibt immer viele Fehler

Eine Alternative dazu ist folgednes Script

webdav.vbs
--------------------------------------------------
Set objNetwork = WScript.CreateObject("WScript.Network") 
objNetwork.MapNetworkDrive "I:" , "https://www.ressource.com/path/to/folder/", false, "username", "password" 
--------------------------------------------------



Quelle: http://ss64.com/vb/mapnetworkdrive.html

Syntax 
      objNetwork.MapNetworkDrive(strLocalDrive, strRemoteShare, [persistent], [strUser], [strPassword])

Key
   objNetwork     : A WScript.network object

   strLocalDrive  : The drive letter (e.g. L:)
   
   strRemoteShare : The UNC path to the remote drive \\MyServer\MyPrinter
                    (String value)
   
   persistent     : True/False - store the mapping persistently in the users profile
                    default = false
   
   strUser        :  The user name. (Optional)
   
   strPassword    :  The password. (Optional)

Windows Webdav Dateibegrenzung

Windows begreznt die Dateigrösse normalerweise auf ca. 50 MB. Dies kann man wie folgt umgehen:

Click Start, click Run, type regedit, and then click OK.
Locate and then click the following registry subkey:
HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\WebClient\Parameters
In the right pane, right-click the FileSizeLimitInBytes value, and then click Modify.
If you cannot see the FileSizeLimitInBytes value, right-click the blank space in the right pane, click New, click DWORD Value, type FileSizeLimitInBytes, and then click OK.
In the Edit DWORD Value box, click to select the Decimal option. In the box under Value data, type a value that is larger than the size of the file that you want to download. Click OK.
Note The default value for the file size limit is 50000000 bytes.
Quit Registry Editor. Restart the computer.