The support forum

Dynamically adjusting backup destination

Jan 12, 2016

The following technique can be used to create a backup job that periodically changes its destination based on some criteria.

For example, this can be used to direct backup into:

1. Separate folder for each day of the week - Monday backups will go into X:\Backups\Monday, Tuesdays - into X:\Backups\Tuesday and so on, cycling back to X:\Backups\Monday on next Monday.

2. Separate folder for every calendar day - X:\Backups\2016-01-12, X:\Backups\2016-01-13, etc.

3. Separate folder on every run, cycling through a set of these - first run goes into X:\Backups\1, next - X:\Backups\2 and so on, restarting from X:\Backup\1 on N-th run.

---

General idea is that our backup destination is not an actual folder, but rather a link to another folder that we re-point from one folder to another as needed using a pre-backup command.

More on symbolic links -
https://en.wikipedia.org/wiki/NTFS_symbolic_link

More on pre-backup commands -
https://bvckup2.com/support/forum/topic/98

---

Symbolic links is an NTFS features, so you obviously need to be backing up onto an NTFS disk for this to work. That is, no FAT32/exFAT disks.

Also, if you are backing up on one of the Samba-based NAS boxes, your mileage may vary, so be sure to test their symlink support first.

Jan 12, 2016

Daily backups with a week worth of history


1. Read the opening post above if you haven't done it already

2. Download and save locally the following script -

    https://bvckup2.com/support/data/set-todays-destination.bat

Let's assume, it's saved as C:\Temp\set-todays-destination.bat

3. Pick two folder names for your backups - first is for where the app will be directing the backups, and second is where the actual backups will be kept.

If in doubt, pick something like this:

    X:\.....\Backup.latest
    X:\.....\Backup.daily

With this you will have Backup.latest pointing at one of Monday, Tuesday, etc. subfolders in Backup.daily

4. Bring up Backup Settings window for the job:

    a.  Set "Backup to" to the path of the first folder ("latest")
    b.  Change "Detecting changes" to "Re-scan destination"
    c.  Go into "More Options" and set "Pre-backup command" to

    C:\Temp\set-todays-destination.bat  <path-to-your-"daily"-folder>

    * If you have spaces in your path, don't forget to put it in quotes.

---

Now if you run this job, say, on Thursday, the .bat file will set Backup.latest to point at Backup.daily\Thursday and that's where the back up will go.

Jan 12, 2016

Daily backups, each in its own folder


1. Read the opening post at the top if you haven't done it already

2. Download and save locally the following script -

    https://bvckup2.com/support/data/set-daily-destination.bat

Let's assume, it's saved as C:\Temp\set-daily-destination.bat

3. Pick two folder names for your backups - first is for where the app will be directing the backups, and second is where the actual backups will be kept.

If in doubt, pick something like this:

    X:\.....\Backup.latest
    X:\.....\Backup.daily

With this you will have Backup.latest pointing at one of 2016-01-11, 2016-01-12, etc. subfolders in Backup.daily

4. Bring up Backup Settings window for the job:

    a.  Set "Backup to" to the path of the first folder ("latest")
    b.  Change "Detecting changes" to "Re-scan destination"
    c.  Go into "More Options" and set "Pre-backup command" to

    C:\Temp\set-daily-destination.bat  <path-to-your-"daily"-folder>

    * If you have spaces in your path, don't forget to put it in quotes.

---

Now if you run this job, say, on Jan 13h, 2016, the .bat file will set Backup.latest to point at Backup.daily\2016-01-13 and that's where the back up will go.

Jan 12, 2016

Cycling through a set of N backup folders, one per run


1. Read the opening post at the top if you haven't done it already

2. Download and save locally the following script -

    https://bvckup2.com/support/data/set-runs-destination.bat

Let's assume, it's saved as C:\Temp\set-runs-destination.bat

3. Pick two folder names for your backups - first is for where the app will be directing the backups, and second is where the actual backups will be kept.

If in doubt, pick something like this:

    X:\.....\Backup.latest
    X:\.....\Backup.snapshots

With this you will have Backup.latest pointing at one of "1", "2", etc. subfolders in Backup.snapshots, cycling back to "1" on N-th run.

4. Bring up Backup Settings window for the job:

    a.  Set "Backup to" to the path of the first folder ("latest")
    b.  Change "Detecting changes" to "Re-scan destination"
    c.  Go into "More Options" and set "Pre-backup command" to

   C:\Temp\set-runs-destination.bat  <snapshots>  <path-to-snapshots-folder>

    whereby <snapshots> is the "N" - the maximum number of separate
    folders to keep. For example, 10.

    * If you have spaces in your path, don't forget to put it in quotes.

---

Now when you first run this job, the .bat file will set Backup.latest to point at Backup.snapshots\1 and that's where the back up will go. On the next run, the .bat will change .latest to point at Backup.snaphosts\2 and so on.

hehudson :

Mar 30, 2016

Hi-
I'm trying to use Bvckup2 with "set-daily-destination.bat" to create destination folders wit the current date.
1 - When I run the backup, a CMD window opens and asks me to hit any key to proceed.
2 - No folders are created in F:\backups\backup\backups.daioy.  Instead, the files are copied into F:\backups\backup\backups.latest

Any suggestions?

Thanks.

New topic

Create
Made by Pipemetrics in Switzerland
Support


Follow
Twitter
Dev blog
Miscellanea Press resources
Testimonials
On robocopy
Company
Imprint

Legal Terms
Privacy