Frank posted an idea about "Automatic Backups" in <br> <br>
ideas
Frank: Increase Button for "save as" or backup file automatic
<br> <br>
As this is also an good idea for me using also manually backups time 2 time i prepared an Batch File doing this for me - for Windows Systems: It's basic is this batch file:
rem @echo off
@set TargetFolder=\%1\%2
echo.
echo BackupFolder: %1
echo Project-SourceFolder: \%1\%3
echo Backup-TargetFolder: \%1\%3
echo.
IF NOT EXIST .\%2\NUL GOTO ERR_SOURCE
echo.
echo ##Backup Folder mit Zeitstempel ##
echo.
echo ## Aktueller Zeitstempel ##
@set TimeStamp=%date:~-4%-%date:~-7,2%-%date:~-10,2%_%time:~-11,2%-%time:~-8,2%-%time:~-5,2%
@set local enabledelayedexpansion
@rem @set TimeStamp=!TimeStamp:^ =0!
@rem @setlocal disabledelayedexpansion
echo %TimeStamp%
echo.
echo.
echo ## Target Backup Folder with TimeStamp ##
@echo TargetFolder = .\%1\%2\%TimeStamp%
echo.
echo.
echo ## Creating Backup Folder ##
IF NOT EXIST .\%1\%3\%TimeStamp%\NUL GOTO CREATEFOLDER
GOTO COPYPROJECT
:CREATEFOLDER
echo Target Folder not existing - Creating Folder
md .\%1\%3\%TimeStamp%\
IF EXIST .\%1\%3\%TimeStamp%\NUL echo Folder successfully created
echo.
echo.
:COPYPROJECT
IF NOT EXIST .\%1\%3\%TimeStamp%\NUL GOTO ERR_FOLDER
xcopy .\%2\* .\%1\%3\%TimeSTamp% /E /F
GOTO END
:ERR_SOURCE
!! Error: Source Path wrong Set
!! Project-Folder wrong in calling Batch File or in Link to this Batch File?
pause
GOTO END
:ERR_FOLDER
!! Error: Folder was not created !!
GOTO END
:END
It uses 3 Variables to give when calling: %1 = BackupFolder The main Backup- Folder on your System
%2 = SourceFolder The Yource Folder, where your Project and additional Files and Folders is located
%3 = Backup-TargetFolder The Destination Folder for your Backup
We assume you place that script avove the Project-Folder, eg.:
c:\www\projects\bootstrap\YOURPROJECT
so, we place the BatchFile into that Directory
c:\www\projects\bootstrap\CopyProject.bat
You may call it on command line like
c:\www\projects\bootstrap\CopyProject.bat backupmain YOURPROJECT YOURPORJECTbak
This will copy all Files and Folders from SourceFolder to DestinationFolder adding a folder with the Timeststamp when started the script
You also may create a second Batch File in
c:\www\projects\bootstrap\CopyYOUPROJECT.bat
which will contain such like:
@echo off
set BackupFolder=backup
set SourceFolder=YOURPROJECT
set TargetFolder=YOURPROJECTbak
call copy-bs-project %BackupFolder% %SourceFolder% %TargetFolder%
You may create a link e.g. on your Desktop to the copyYOURPROJECT.bat file or create a link containg the line to the CpyProject.bat with the 3 Parameters as mentioned above for the coimmand line.
It will result in
c:\www\projects\bootstrap\backupmain\YOUPROJECTbak\%TimeStamp"
OK.
Thats so far. Hope it works and you feel fine with it. But also hope that such a feature will be soon integrated in BS.
Ralph