Skip to main content
moved words
Source Link
mael'
  • 1.9k
  • 2
  • 11
  • 19

After an initial full backup of each

This sounds like an ideal situation for robocopy; it sounds like you're getting hung up on this:

..incremental backups would really just be to make a copy of any new file, and make a new copy with an indexed filename of any file that has changed since the last backup.

To handle that situation I would use FC in a loop to compare a file if it exists in the full backup, and if it does, individually copy it over and include your modified name.


So to set this up, I would determine how often you:

  1. how often you want to do your full backup and whether or not it should erase contents that no longer exist in the source folder and
  2. how often you'd like to do your incremental backups, if not manually.

In both cases, I would likely setup a Scheduled Task in Windows to run the batch file needed. The complexity of either script is going to be determined by your directory structure, but for the most part this is sort of what your incremental backup logic would look like:

@echo off

set "dir=C:\Your\Directory"
set "bkp=N:\Your\Backup\Drive"

for %%A in (%dir%\*) do (
    if exist "%bkp%\%%~nxA" (
        fc "%%A" "%bkp%\%%~nxA"
        if %ERRORLEVEL% EQU 1 (copy /y "%%A" "%bkp%\%%~nA MODIFIED%%~xA")
        )
    )
)

You can use parameter extensions and different for options to customize the loop based on how your directories are setup. If you don't want to delete anything via robocopy you just use robocopy "source" "destination" /e - you can also loop the robocopy with for to do individual folders at a time as opposed to your root directory - that way you can generate a log file for each one if you're looking to have more granular visibility.

Reference: robocopy, fc, for, copy, parameters

After an initial full backup of each

This sounds like an ideal situation for robocopy; it sounds like you're getting hung up on this:

..incremental backups would really just be to make a copy of any new file, and make a new copy with an indexed filename of any file that has changed since the last backup.

To handle that situation I would use FC in a loop to compare a file if it exists in the full backup, and if it does, individually copy it over and include your modified name.


So to set this up, I would determine how often you:

  1. want to do your full backup and whether or not it should erase contents that no longer exist in the source folder and
  2. how often you'd like to do your incremental backups, if not manually.

In both cases, I would likely setup a Scheduled Task in Windows to run the batch file needed. The complexity of either script is going to be determined by your directory structure, but for the most part this is sort of what your incremental backup logic would look like:

@echo off

set "dir=C:\Your\Directory"
set "bkp=N:\Your\Backup\Drive"

for %%A in (%dir%\*) do (
    if exist "%bkp%\%%~nxA" (
        fc "%%A" "%bkp%\%%~nxA"
        if %ERRORLEVEL% EQU 1 (copy /y "%%A" "%bkp%\%%~nA MODIFIED%%~xA")
        )
    )
)

You can use parameter extensions and different for options to customize the loop based on how your directories are setup. If you don't want to delete anything via robocopy you just use robocopy "source" "destination" /e - you can also loop the robocopy with for to do individual folders at a time as opposed to your root directory - that way you can generate a log file for each one if you're looking to have more granular visibility.

Reference: robocopy, fc, for, copy, parameters

After an initial full backup of each

This sounds like an ideal situation for robocopy; it sounds like you're getting hung up on this:

..incremental backups would really just be to make a copy of any new file, and make a new copy with an indexed filename of any file that has changed since the last backup.

To handle that situation I would use FC in a loop to compare a file if it exists in the full backup, and if it does, individually copy it over and include your modified name.


So to set this up, I would determine:

  1. how often you want to do your full backup and whether or not it should erase contents that no longer exist in the source folder and
  2. how often you'd like to do your incremental backups, if not manually.

In both cases, I would likely setup a Scheduled Task in Windows to run the batch file needed. The complexity of either script is going to be determined by your directory structure, but for the most part this is sort of what your incremental backup logic would look like:

@echo off

set "dir=C:\Your\Directory"
set "bkp=N:\Your\Backup\Drive"

for %%A in (%dir%\*) do (
    if exist "%bkp%\%%~nxA" (
        fc "%%A" "%bkp%\%%~nxA"
        if %ERRORLEVEL% EQU 1 (copy /y "%%A" "%bkp%\%%~nA MODIFIED%%~xA")
        )
    )
)

You can use parameter extensions and different for options to customize the loop based on how your directories are setup. If you don't want to delete anything via robocopy you just use robocopy "source" "destination" /e - you can also loop the robocopy with for to do individual folders at a time as opposed to your root directory - that way you can generate a log file for each one if you're looking to have more granular visibility.

Reference: robocopy, fc, for, copy, parameters

added 234 characters in body
Source Link
mael'
  • 1.9k
  • 2
  • 11
  • 19

After an initial full backup of each

This sounds like an ideal situation for robocopy; it sounds like you're getting hung up on this:

..incremental backups would really just be to make a copy of any new file, and make a new copy with an indexed filename of any file that has changed since the last backup.

To handle that situation I would use FC in a loop to compare a file if it exists in the full backup, and if it does, individually copy it over and include your modified name.


So to set this up, I would determine how often you:

  1. want to do your full backup and whether or not it should erase contents that no longer exist in the source folder and
  2. how often you'd like to do your incremental backups, if not manually.

In both cases, I would likely setup a Scheduled Task in Windows to run the batch file needed. The complexity of either script is going to be determined by your directory structure, but for the most part this is sort of what your incremental backup logic would look like:

@echo off

set "dir=C:\Your\Directory"
set "bkp=N:\Your\Backup\Drive"

for %%A in (%dir%\*) do (
    if exist "%bkp%\%%~nxA" (
        fc "%%A" "%bkp%\%%~nxA"
        if %ERRORLEVEL% EQU 1 (copy /y "%%A" "%bkp%\%%~nA MODIFIED%%~xA")
        )
    )
)

You can use parameter extensions and different for options to customize the loop based on how your directories are setup. If you don't want to delete anything via robocopy you just use robocopy "source" "destination" /e - you can also loop the robocopy with for to do individual folders at a time as opposed to your root directory - that way you can generate a log file for each one if you're looking to have more granular visibility.

Reference: robocopy, fc, for, copy, parameters

After an initial full backup of each

This sounds like an ideal situation for robocopy; it sounds like you're getting hung up on this:

..incremental backups would really just be to make a copy of any new file, and make a new copy with an indexed filename of any file that has changed since the last backup.

To handle that situation I would use FC in a loop to compare a file if it exists in the full backup, and if it does, individually copy it over and include your modified name.


So to set this up, I would determine how often you:

  1. want to do your full backup and whether or not it should erase contents that no longer exist in the source folder and
  2. how often you'd like to do your incremental backups, if not manually.

In both cases, I would likely setup a Scheduled Task in Windows to run the batch file needed. The complexity of either script is going to be determined by your directory structure, but for the most part this is sort of what your incremental backup logic would look like:

@echo off

set "dir=C:\Your\Directory"
set "bkp=N:\Your\Backup\Drive"

for %%A in (%dir%\*) do (
    if exist "%bkp%\%%~nxA" (
        fc "%%A" "%bkp%\%%~nxA"
        if %ERRORLEVEL% EQU 1 (copy /y "%%A" "%bkp%\%%~nA MODIFIED%%~xA")
        )
    )
)

After an initial full backup of each

This sounds like an ideal situation for robocopy; it sounds like you're getting hung up on this:

..incremental backups would really just be to make a copy of any new file, and make a new copy with an indexed filename of any file that has changed since the last backup.

To handle that situation I would use FC in a loop to compare a file if it exists in the full backup, and if it does, individually copy it over and include your modified name.


So to set this up, I would determine how often you:

  1. want to do your full backup and whether or not it should erase contents that no longer exist in the source folder and
  2. how often you'd like to do your incremental backups, if not manually.

In both cases, I would likely setup a Scheduled Task in Windows to run the batch file needed. The complexity of either script is going to be determined by your directory structure, but for the most part this is sort of what your incremental backup logic would look like:

@echo off

set "dir=C:\Your\Directory"
set "bkp=N:\Your\Backup\Drive"

for %%A in (%dir%\*) do (
    if exist "%bkp%\%%~nxA" (
        fc "%%A" "%bkp%\%%~nxA"
        if %ERRORLEVEL% EQU 1 (copy /y "%%A" "%bkp%\%%~nA MODIFIED%%~xA")
        )
    )
)

You can use parameter extensions and different for options to customize the loop based on how your directories are setup. If you don't want to delete anything via robocopy you just use robocopy "source" "destination" /e - you can also loop the robocopy with for to do individual folders at a time as opposed to your root directory - that way you can generate a log file for each one if you're looking to have more granular visibility.

Reference: robocopy, fc, for, copy, parameters

added 234 characters in body
Source Link
mael'
  • 1.9k
  • 2
  • 11
  • 19

After an initial full backup of each

This sounds like an ideal situation for robocopy; it sounds like you're getting hung up on this:

..incremental backups would really just be to make a copy of any new file, and make a new copy with an indexed filename of any file that has changed since the last backup.

To handle that situation I would use FC in a loop to compare a file if it exists in the full backup, and if it does, individually copy it over and include your modified name.


So to set this up, I would determine how often you:

  1. want to do your full backup and whether or not it should erase contents that no longer exist in the source folder and
  2. how often you'd like to do your incremental backups, if not manually.

In both cases, I would likely setup a Scheduled Task in Windows to run the batch file needed. The complexity of either script is going to be determined by your directory structure, but for the most part this is sort of what your incremental backup logic would look like:

@echo off

set "dir=C:\Your\Directory"
set "bkp=N:\Your\Backup\Drive"

for %%A in (%dir%\*) do (
    if exist "%bkp%\%%~nxA" (
        fc "%%A" "%bkp%\%%~nxA"
        if %ERRORLEVEL% EQU 1 (copy /y "%%A" "%bkp%\%%~nA MODIFIED%%~xA")
        )
    )
)

After an initial full backup of each

This sounds like an ideal situation for robocopy; it sounds like you're getting hung up on this:

..incremental backups would really just be to make a copy of any new file, and make a new copy with an indexed filename of any file that has changed since the last backup.

To handle that situation I would use FC in a loop to compare a file if it exists in the full backup, and if it does, individually copy it over and include your modified name.


So to set this up, I would determine how often you:

  1. want to do your full backup and whether or not it should erase contents that no longer exist in the source folder and
  2. how often you'd like to do your incremental backups, if not manually.

In both cases, I would likely setup a Scheduled Task in Windows to run the batch file needed. The complexity of either script is going to be determined by your directory structure, but for the most part this is sort of what your incremental backup logic would look like:

After an initial full backup of each

This sounds like an ideal situation for robocopy; it sounds like you're getting hung up on this:

..incremental backups would really just be to make a copy of any new file, and make a new copy with an indexed filename of any file that has changed since the last backup.

To handle that situation I would use FC in a loop to compare a file if it exists in the full backup, and if it does, individually copy it over and include your modified name.


So to set this up, I would determine how often you:

  1. want to do your full backup and whether or not it should erase contents that no longer exist in the source folder and
  2. how often you'd like to do your incremental backups, if not manually.

In both cases, I would likely setup a Scheduled Task in Windows to run the batch file needed. The complexity of either script is going to be determined by your directory structure, but for the most part this is sort of what your incremental backup logic would look like:

@echo off

set "dir=C:\Your\Directory"
set "bkp=N:\Your\Backup\Drive"

for %%A in (%dir%\*) do (
    if exist "%bkp%\%%~nxA" (
        fc "%%A" "%bkp%\%%~nxA"
        if %ERRORLEVEL% EQU 1 (copy /y "%%A" "%bkp%\%%~nA MODIFIED%%~xA")
        )
    )
)
Source Link
mael'
  • 1.9k
  • 2
  • 11
  • 19
Loading