Automated backups (1 Viewer)

Groundrush

Registered User.
Local time
Today, 14:17
Joined
Apr 14, 2002
Messages
1,376
Having problems with my dvd burner that I normally use to save all my database backups to.

Using windows scheduled tasks I was able to use a batch file that was run each evening that would save my data to another location on the network.

Only problem was that it would overwrite the previous days data.

What I am looking for is a method that would allow me to save a backup for each day of the month saved as the day then another at the end of the month saved as the month

The days would only be overwritten the following month on the same day and the months would only be overwritten the following year when the same month is reached.

This is the basic code I'm using at the moment.
Code:
@ECHO OFF

IF EXIST P:\Database_Backup GOTO :NEXT
MKDIR P:\Database_BackUp

:NEXT

XCOPY /S /Y "E:\Data" "P:\Database_BackUp"

End

Anyone have any better ideas or methods?
 

Groundrush

Registered User.
Local time
Today, 14:17
Joined
Apr 14, 2002
Messages
1,376
Think I worked it out

Code:
@echo off

echo ### Backing up your Sites directory...

xcopy /s /c /d /e /h /i /r /k /y "E:\Data" "P:\Database_BackUp\%Date%"

Pause
 

rodmc

Registered User.
Local time
Today, 13:17
Joined
Apr 15, 2010
Messages
514
there's a lot of free backup apps out there, look for one that does Grandfather/Father/son rotational backups (I'll assume you know what that is), this will reduce traffic and backup time significantly.
 

Users who are viewing this thread

Top Bottom