0

Is it possible to back up an access database? I have done research on how to backup access database through php but I wasnt able to get a good answer. Most of the result that came out is about backing up MySQL database. Can anyone help me :) thanks

6
  • "access database", as in Microsoft Access? If so, then are Access databases not just normal files, just like SQLite databases? Commented Mar 7, 2013 at 10:31
  • @SverriM.Olsen - yes! microsoft access. The Database contains information about employees :) Commented Mar 7, 2013 at 11:01
  • Backup as in copy()? Commented Mar 7, 2013 at 11:14
  • @ÁlvaroG.Vicario - yeah! i want to automatically back it up Commented Mar 7, 2013 at 11:15
  • I mean, is it possible to create a code that will automatically saved an access database. For example, the database will be backup every week, like that. You dont have to manually back it up. Im using windows 7 by the way. :) Commented Mar 7, 2013 at 12:24

1 Answer 1

2

re: actually performing the backup

Backing up a native Access database is simply a matter of copying the entire database file (.mdb for Access_2003 and earlier, .accdb for Access_2007 and later). You could use PHP for that, but any scripting language would work, even a simple Windows batch file that does something like

copy /Y d:\apps\databases\mydatabase.accdb z:\backups\databases\*.*

If you're really set on using PHP then you'll likely end up using the copy() function.

re: automatic scheduling of the backup

The Task Scheduler in Windows could take care of that for you. Once you've created your script to copy the database file(s) you can create a scheduled task to run it periodically. See the MSDN article Using the Task Scheduler (Windows) for more information.

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.