Sql Backup And FTP

Welcome Guest Search | Active Topics | Log In | Register
New Topic Post Reply
Changing file name Options · View
Kevin Fox
#1 Posted : Sunday, August 23, 2009 2:40:50 AM Quote
Rank: Guest

Groups:

Joined: 8/10/2009
Posts: 609
It would be useful to be able to change the file name of the backup because at the moment, as it's linked to the date, it always unique but this means the FTP site just gets fuller and fuller.

If you had the option of linking the file name directly to the day (Monday, Tuesday etc) then the files on the FTP would get overwritten each week and you would only get a maximum of 7 files.
ruslan
#2 Posted : Sunday, August 23, 2009 10:30:09 AM Quote
Rank: Administration

Groups: Administrators

Joined: 8/10/2009
Posts: 350
You can easily set "How long to keep on FTP server" to 7 days to reach this goal of saving space on your ftp server.
gmair
#3 Posted : Friday, July 09, 2010 1:02:21 PM Quote
Rank: Guest

Groups:

Joined: 8/10/2009
Posts: 609
I also support this being added as a feature. I have my backups created in a local folder, and that folder is then backed up using one of the many online backup services. (I use Data Deposit Box) The "keep 7 days" option in SQLBackupandFTP limits me to 7 copies in my local folder, but because the online backup service does not automatically delete files no longer on the local system (a key feature for most file types), this means that my data storage online grows continually. Given the common use of online backup services today, to have this option in SQLBackupandFTP would be great so that we don't continually have newly-named files and manage the online backup versions to 7 only.
ruslan
#4 Posted : Saturday, July 10, 2010 1:01:37 AM Quote
Rank: Administration

Groups: Administrators

Joined: 8/10/2009
Posts: 350
Thank you for a good explanation. See this post for a reply.
Guest
#5 Posted : Friday, July 16, 2010 10:59:45 AM Quote
Rank: Guest

Groups:

Joined: 8/10/2009
Posts: 609
ruslan, thanks for your reply and the link, and I look forward to seeing the new naming option in a later version. It will be a big improvement.

For Kevin, I had to solve the issue NOW, and did so using a VB6 EXE that I have Task Scheduler run 5 minutes after the scheduled backup. In case you want to do the same thing, here is the code. All you need is a folder that SQLBackupandFTP saves the source backups into (with default naming) and a separate folder for the renamed backups to go to. Put in the correct source and destination folder paths below, compile this as a VB6 EXE, and you are good to go.

*********************************

Sub Main()

On Error GoTo Errorhandler

'Use FileSystemObject to copy files
Dim objFSO As Scripting.FileSystemObject
Set objFSO = CreateObject("Scripting.FileSystemObject")

'Get the source backup folder and its collection of files
Dim objFolder As Scripting.Folder
Set objFolder = objFSO.GetFolder("C:\SQL Server Backups\Source Backups")
Dim objFiles As Scripting.Files
Set objFiles = objFolder.Files
Dim strFileName As String
Dim strNewFileName As String
Dim strDayOfWeek As String

'Determine current day of week
strDayOfWeek = WeekdayName(Weekday(Now), True)

'Copy the current live files to the renamed folder and delete them
Dim file As Scripting.file
For Each file In objFiles
If file.Type = "Compressed (zipped) Folder" Then
strFileName = file.Name
strNewFileName = Left(strFileName, InStr(1, strFileName, ".") - 9) & "_" & strDayOfWeek & ".zip"
file.Name = strNewFileName
file.Copy "C:\SQL Server Backups\Renamed Backups\", True
file.Delete
End If
Next

'Release objects
Set file = Nothing
Set objFiles = Nothing
Set objFolder = Nothing

Exit Sub

Errorhandler:

Exit Sub

End Sub
Guest
#6 Posted : Tuesday, August 10, 2010 5:03:35 AM Quote
Rank: Guest

Groups:

Joined: 8/10/2009
Posts: 609
I see current development mentions backup to targets such as DropBox so it will depend on how this is implemented but I would benefit from being able to use the same file name (or a day pattern as suggested) to allow systems like DropBox to maintain the differences between the backups (even the free edition maintains a number of revisions of a file). This would allow for much more efficient use of the space made available.
ruslan
#7 Posted : Tuesday, August 10, 2010 9:18:34 AM Quote
Rank: Administration

Groups: Administrators

Joined: 8/10/2009
Posts: 350
You don't need to wait for a new version to use DropBox. My favorite configuration is to select "Backup to local folder" in SQLBackupAndFTP and set the target folder to "My Dropbox". "My Dropbox" then automatically syncs with Dropbox servers.
And yes, withing a month we will release a version that would support different file formats:
1. [DbName]YYYYMMDDHHMM.zip (default)
2. [DbName]YYYYMMDD.zip
3. [DbName]DayOfMonth.zip
4. [DbName]DayOfWeek.zip
5. [DbName].zip

See this post for details
Guest
#8 Posted : Wednesday, August 11, 2010 3:51:15 PM Quote
Rank: Guest

Groups:

Joined: 8/10/2009
Posts: 609
Great news ruslan, I look forward to the new release.

That is how I actually use it with dropbox at the moment but to keep on top of storage sizes I need to keep tidying out my drop box folder of older backups (I also sync up other file system backups with the database).

Using the same file name would allow DropBox to replace/update the file on the server and DropBox would also keep a number of previous versions (that I could revert back to if required). I'm not sure if DropBox sync is intelligent enough only to sync the binary differences between the 2 files but if it did, it would greatly reduce the amount of data needed to be uploaded over my slow upload ADSL line! Sort of an incremntal backup solution?
ruslan
#9 Posted : Thursday, August 12, 2010 9:18:42 AM Quote
Rank: Administration

Groups: Administrators

Joined: 8/10/2009
Posts: 350
Understood. Dropbox doesn't do "diff" backup last time I checked. Once new version is ready, I'll post about it here.
Guest
#10 Posted : Thursday, August 12, 2010 10:39:46 AM Quote
Rank: Guest

Groups:

Joined: 8/10/2009
Posts: 609
Had a quick look into the "diff" backup point and apparently it does now :-)

ruslan
#11 Posted : Thursday, August 12, 2010 11:30:26 AM Quote
Rank: Administration

Groups: Administrators

Joined: 8/10/2009
Posts: 350
Wow, it's a pleasant surprise. No need for differential backups any more since Dropbox will handle it. Almost too good to be true. Needs testing.
ruslan
#12 Posted : Friday, August 20, 2010 6:11:30 PM Quote
Rank: Administration

Groups: Administrators

Joined: 8/10/2009
Posts: 350
I am happy to say that we have implemented output file format options feature in v 5.1. See this post for more.
Guest
#13 Posted : Monday, September 13, 2010 3:38:57 PM Quote
Rank: Guest

Groups:

Joined: 8/10/2009
Posts: 609
Great work ruslan, keep up the great work on a fantastic piece of software!
ruslan
#14 Posted : Monday, September 13, 2010 4:28:31 PM Quote
Rank: Administration

Groups: Administrators

Joined: 8/10/2009
Posts: 350
Thank you. Let me share it with Mike and Alex.
Quick Reply Show Quick Reply
New Topic Post Reply
Forum Jump  
You can post new topics in this forum.
You can reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You can create polls in this forum.
You can vote in polls in this forum.