Basic backup question...

bassman197

Registered User.
Local time
Today, 05:03
Joined
Sep 18, 2007
Messages
35
Hi,

I have gotten in the habit of just copying and pasting my database to a new folder, then changing the name to create a backup copy (for instance: mydatabase_backup_090408 for today's date. But is this a bad thing, as far as the integrity of the database goes? In other words, is there something inherent in Access' backup utility, that I should always be using the utility to create backup files, not just copying and pasting? (I don't want to create copies that are more corruption-prone!)

Thanks,
bassman197
 
As long as the database isn't open, copying and pasting should work fine. Presuming it's split, that means no front ends open/connected to it either.
 
I ZIP any database into a date/time stamp file name ever time before I open them or run a compact.

I have never used the built in Access backup. Form the files I have seen that it has created, it loo0ks just like a copy the file.
 
yeah, i just make a copy/paste in my folder then rename the copy with date and brief description of what is different from the previous version (i number each consecutively). sometimes it's even just something like

MyDatabase_2009.04.08 - 032 just in case.zip, or
MyDatabase_2009.04.08 - 033 new data.zip, as well as
MyDatabase_2009.04.08 - 034 new reports for primary isolates.zip
 
you can even copy the file while it is being used. there may be a slight possibiliity that you get inconsisitent data (if a user is in the middle of some processing), but sometimes it is more important that you get the copy

one issue with inbuilt backup is that if you have a split database, then the inbuilt backup will be backing up the fornt end -- when the bit you really need to back up is the backend.

note also that if your backend is on a network, it may well be included in any scheduled tape backup procedures you have.
 
i have used the following code which i got it from these forums (where i cant remember) but has helped me immensely. Maybe this can help many.
Code:
Public Function BackupAndZipit()
'This function will allow you to copy a db that is open,
'rename the copied db and zip it up to anther folder.
'You must set a reference to the 'Microsoft Scripting Runtime' for the CopyFile piece to work!
'Thanks to Ricky Hicks for the .CopyFile code
Dim fso As FileSystemObject
Dim sSourcePath As String
Dim sSourceFile As String
Dim sBackupPath As String
Dim sBackupFile As String
sSourcePath = "S:\HBEU\Fraud Chargebacks\DATABASES\"
sSourceFile = "DOSTIFRAUDCB.mde"
sBackupPath = "J:\OPS DESK\Sunil\BackupDB\"
sBackupFile = "BackupDB_" & Format(Date, "mmddyyyy") & "_" & Format(Time, "hhmmss") & ".mdb"
'sBackupFile = "s.mdb"
Set fso = New FileSystemObject
'Set fso = CreateObject("Scripting.FileSystemObject")
fso.CopyFile sSourcePath & sSourceFile, sBackupPath & sBackupFile, True
Set fso = Nothing
'Dim sWinZip As String
'Dim sZipFile As String
'Dim sZipFileName As String
'Dim sFileToZip As String
'
'sWinZip = "C:\Program Files\WinZip\WinZip32.exe" 'Location of the WinZip program
'sZipFileName = Left(sBackupFile, InStr(1, sBackupFile, ".", vbTextCompare) - 1) & ".zip"
'sZipFile = sBackupPath & sZipFileName
'sFileToZip = sBackupPath & sBackupFile
'
'Call Shell(sWinZip & " -a " & sZipFile & " " & sFileToZip, vbHide)
Beep
MsgBox "Backup was successful and saved @ " & Chr(13) & Chr(13) & sBackupPath & Chr(13) & Chr(13) & "The backup file name is " & Chr(13) & Chr(13) & sBackupFile, vbInformation, "Backup Completed"
'If Dir(sBackupPath & sBackupFile) <> "" Then Kill (sBackupPath & sBackupFile)
End Function

declare the above function in modules. You can call this function anywhere. Hope this helps
 

Users who are viewing this thread

Back
Top Bottom