Quantcast
Channel: 2BrightSparks
Viewing all articles
Browse latest Browse all 9303

Re: Backup of directory

$
0
0
You can leverage (include) Variables in your Destination path to store each backup in a different location. Just include or use one or more calendar-based Variable/s in/as a folder in the path (and/or, the single-Zip name, if used). Note that you can only do this to a 'wrapping' container that you specify (a folder or a single-Zip), and not to individual files or folders that are copied - thus:

X:\Backups\%DATE%\subfolder\
X:\Backup_%DATE%\backup.zip
X:\Backup\%DATE%_backup.zip

and so on. Check out Help > Search > 'variables' (without the quotes) > top hit for a full list of Variables

Bear in mind that some can only be used at/after a certain stage or with certain profile types - as shown in Help. %DATE% would generate a date as per your Short Date in Windows, which is probably not YYYYMMDD, but you can concatenate %YEAR%, %MONTH% & %DAY% Variables to create one (or, create your own via scripting - see below).

It is up to you whether you use Variables that 'cycle'* so that the total number of backups is limited, and so that the profile will eventually update/refresh the first location (then the second, and so on) or if you use Variables such as %DATE% which will produce a unique/incrementing value every [interval] and thus never 'cycle'. In all cases it is up to you to monitor drive space and delete old backups (etc) if necessary.


There's no concept of an internal variable that counts each backup and 'exposes' a value (individual to a profile or 'global'). You could possibly create an installable script to generate the former, but you'd be responsible for the 'housekeeping' of it.

Note that we don't write bespoke scripts for people, nor provide bespoke assistance in doing so. We provide the scripting facility, the Scripting section in the Help, and the examples provided in the program folder** and the scripting page of the website. The rest is up to the user...


* such as %DAYOFWEEKNAME%, %WEEKOFTHEMONTH%, etcetera - many others are available

** not all scripts in the program folder are installable. Some are 'callable' (for use in Programs-Before, or similar) and/or stand-alone.

Viewing all articles
Browse latest Browse all 9303

Trending Articles