Problems with Batch Backup and Specific Software

Asked

Viewed 132 times

0

I have two problems with backups performed in different ways (they are separate and independent solutions), the first is a "batch" (BAT file) and the second is with SEAGATE DASHBOARD backup software (I’ll call SD to simplify).

The backup is done from some previously selected folders of C drive, which I treat as "Hd_server".

In case of backup done by BAT file, are three options of external drives (treated as "External Hd_drive"), E:, F: or G: to receive updated data from previously selected folders.

So, as the file has the name of BACKUP.BAT, to backup C: to the external hard drive on F:, just run BACKUP F:

I put the complete batch below, but only with two folders for example, Contas1 and Contas2 that are in C: (C: Contas1 and C: Contas2, respectively).

Remarks: a backup LOG file is generated, modified data is copied including from sub-directories and at the end of the file there are indications of the options used in the commands.

cls
echo off

cls
echo ##### BACKUP PARCIAL #####

rem %%%%%%%%%%% DEFINA A UNIDADE A COPIAR %%%%%%%%%%% 

set UNID=E:

rem Opções de unidades:  E:, F: ou G:

cls

echo.

echo   .---------------------------------------------------------------------------.
echo   : O BACKUP SERA FEITO NA UNIDADE %UNID%                                     :
echo   :                                                                           :
echo   :                 De HD_SERVER para %UNID%\HD_Externo                       :
echo   :                 ===================================                       :
echo   :                                                                           :
ECHO   :              ***** CONECTAR AO HD EXTERNO PRIMEIRO *****                  :
echo   :                                                                           :
ECHO   :     ***** A LISTA A SEGUIR MOSTRA O ULTIMO BACKUP COM OS TEMPOS *****     :
echo   :                                                                           :
echo   :                                                                           :
echo   :                                                                           :
ECHO   :           Tecle  ENTER  para iniciar ou  CTRL+C  para cancelar            :
ECHO   `---------------------------------------------------------------------------;
echo.

pause

cls

echo.
echo.
echo         ##############  ULTIMO BACKUP  ##############
echo.

type backup_nb.txt

echo.

pause

cls

copy backup_nb.txt backup_nb.ant

del backup_nb.txt

cls

echo. >>backup_nb.txt
echo          **************************************************************>>backup_nb.txt
echo. >>backup_nb.txt
echo De HD_Server para HD_Externo>>backup_nb.txt
echo. >>backup_nb.txt
echo **************************************************************>>backup_nb.txt
echo. >>backup_nb.txt
echo. >>backup_nb.txt
echo ### INICIO ###>>backup_nb.txt
date /T>>backup_nb.txt
time /T>>backup_nb.txt
echo. >>backup_nb.txt

echo.
echo.
echo.
echo.
echo                 * * * * *  I N I C I O  D O  B A C K U P  * * * * *
echo.
echo.
echo.
echo.
date /T
echo.
time /T

echo.

echo **************************************************************
echo **************************************************************>>backup_nb.txt
echo C,Contas1
echo C,Contas1>>backup_nb.txt
XCOPY C:\Contas1 %UNID%\BACKUP\Contas1 /D /V /E /Y
date /T>>backup_nb.txt
time /T>>backup_nb.txt
date /T
time /T
echo **************************************************************
echo     **************************************************************>>backup_nb.txt

echo **************************************************************
echo **************************************************************>>backup_nb.txt
echo C,Contas2
echo C,Contas2>>backup_nb.txt
XCOPY C:\Contas2 %UNID%\BACKUP\Contas2 /D /V /E /Y
date /T>>backup_nb.txt
time /T>>backup_nb.txt
date /T
time /T
echo **************************************************************
echo **************************************************************>>backup_nb.txt

echo. >>backup_nb.txt
echo ### FINAL ####>>backup_nb.txt
date /T>>backup_nb.txt
time /T>>backup_nb.txt
echo.
date /T
echo.
time /T

echo.
echo.
echo.
echo.
echo                 * * * * *  F I M  D O  B A C K U P  * * * * *

echo. >>backup_nb.txt
echo.
echo.
echo.

type backup_nb.txt

echo.
echo.
echo                 * * * * *  F I M  D O  B A C K U P  * * * * *
echo.
echo.
echo.

pause

REM     XCOPY origem destino /OPCAO1 /OPCAO2 ...    XCOPY copia sub-   diretorios tambem
rem
rem     XCOPY origem destino /D /E /V /F
REM
REM     /D  SE NENHUMA DATA ESPECIFICADA, COPIA SO OS MAIS NOVOS QUE O   DESTINO
rem         ou copia so os alterados durante ou apos a data especificada  (/D:m-d-y)
rem
rem     /E  copia pastas e sub-pastas INCLUSIVE as vazias
rem
rem     /V  verifica copia
rem
rem     /Y  nao pergunta se substitui
rem
rem     /F  Exibe copia por completo ao copiar

echo on   

1) Problem with BAT file: by including in the backup files downloaded from the internet, for example, some are not copied, as a message comes up saying that "the name of the file is too long".

In the case of SD software, there is Seagate’s own external drive and manufacturer software automatically updates data from previously selected folders whenever there is change in data.

2) Problem in SD backup software: I was surprised to check the data "backups" and noticed that the dates and times of the files are not the original dates and times, being the dates and times of the backup. The problem is that some files are managed precisely by the date and time they were updated, which impairs this type of control. Another problem is that the SD software "does not overwrite" the changed files as it keeps each version changed by creating control folders for each of them, ie if I changed 5 times a file on different dates, it will generate five new control folders, each with the respective copy of the altered file on date; however the latest files (the latest - distinct files) can be recovered by the software. This fact impairs a direct query to the data (on the backup drive), since the most recent data, saved on different dates, are in also distinct folders harming the analysis of this data.

Doubt:

Faced with the problems presented (remembering that they are separate and independent solutions), there is a backup software that copies files of long names (that in the BAT file are not copied) and that maintains the original date and time of the files "backupeados" in addition to keeping the data organized in the way they were originally, that is, overwriting the previous files by the updated ones and in the same folder structure?

The goal is to perform the backups with an option that does not present any of these problems.

Grateful from now on.

1 answer

1

If the OS is Windows does the test using Cobian Backup.

I use it for a long time and it has great backup options, besides being free.

http://cobiansoft.com/

  • Hi Laércio, thanks for the answer, I waited to see if someone presented something about the problems reported in addition to an indication for the solution of the problem, but its indication is very good, so I voted in the answer. Grateful.

  • 1

    Thanks for the @Leo vote, batch backup is very useful, but in some cases it can leave you with no option. With Cobian you’ll be able to better manage backups, configure when to delete old backups, and even email in case of failure.

  • Very good. Thank you

  • Hi @Laércio, I did some tests with Cobian Backup, which works with Windows 10 despite not indicating this, and noticed a problem (for me at least), when a file or a folder with or without files is deleted from the source, in the option "differential" (I started using this after backup on "full" option), it does not delete these backup items, ie if you need to recover the backup sometime it will come with all the files and folders that I had already deleted.

  • I also checked that the differential backup is recoding the same files, not only the changed ones as the software indicates...

Browser other questions tagged

You are not signed in. Login or sign up in order to post.