使用PHP脚本备份访问数据库 [英] Backup ACCESS Database using PHP script

查看:82
本文介绍了使用PHP脚本备份访问数据库的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

是否可以备份access database?我已经完成了有关如何通过php备份访问数据库的研究,但是我没有一个很好的答案.出现的大多数结果都与备份MySQL database有关.谁能帮我:)谢谢

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

推荐答案

re:实际执行备份

备份本机Access数据库仅是复制整个数据库文件(对于Access_2003和更低版本为.mdb,对于Access_2007及更高版本为.accdb)只是一个问题.您可以 为此使用PHP,但是任何脚本语言都可以使用,即使是简单的Windows批处理文件也可以执行类似的操作

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\*.*

如果您真的想使用PHP,那么您可能最终会使用

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

re:自动计划备份

Windows中的任务计划程序可以为您解决这些问题.创建脚本以复制数据库文件后,您可以创建计划任务以定期运行它.请参阅MSDN文章使用任务计划程序(Windows),以获取更多信息.

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.

这篇关于使用PHP脚本备份访问数据库的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆