• Backup2Mail


    Backup2Mail是一个能够定期备份MySQL数据库的PHP应用程序,并将备份发送至设定的好邮箱中。

    Backup2Mail is mini PHP application that creates regular backups of your MySQL database and sends it to configurable e-mail address. The whole process is scheduled with a help of Cron, a Unix program that runs programs at scheduled times.

    Install and setup (with SSH)

    1. Open 'index.php' in you text-editor and change settings. If you're not sure about something, leave the default values. Database settings and your e-mail are required.
    2. Upload folder in your public web folder to test it. Open the file in your browser. If you see the black page with green letters and there's no errors, you can proceed.
    3. Create new folder 'backup2mail' in your web root, above the public web folder — you don't want someone to run the script from the browser, right?
    4. Move all files from your temporary folder to 'backup2mail'
    5. Connect with SSH to your server, type crontab -e (to edit Cron schedule table) and the text editor should show up.
    6. Add the following line:
      0 0 * * * php /home/your_account/backup2mail/index.php >/dev/null 2>&1

      Numbers and asterisks are the interval part, see the cheat sheet below.
      php /home/your_account/backup2mail/index.php means that PHP will execute the script, and >/dev/null 2>&1 tells Cron not to send output to e-mail specified in the first line of Cron configuration file.

      Replace 'your_account' with your account username, and adjust the interval (the above is everyday at midnight).

      Interval cheat sheet

      * * * * * every minute
      0 0 * * * every day at midnight
      0 5 * * * every day at five o'clock in the morning
      (11 = 11AM, 23 = 11PM)
      0 0 * * 0 every Sunday at midnight
      (0 = Sunday, 1 = Monday, ...)
    7. Hit Control + X to close the file, type Y to save changes, press Enter to confirm.
    8. Type crontab -l to check if everything is set properly. If it is, exit command line.
    9. Wait for the first backup to arrive in your mailbox.
    10. If you received the backup file, you're done. Buy yourself something nice!

    点击次数   官方主页【官方主页】   下载地址【下载地址】

    网友留言/评论

    我要留言/评论

    相关开源项目

    互联网服务监控 Luneta:Luneta 是一个用来监控互联网上资源和服务的 Web 接口和引擎,如果某些问题出现,你将会受到邮件,当故障恢复时也会得到邮件提醒。
    VHCS:强大而成熟且开源的虚拟主机管理系统VHCS。
    Yahoo-BOSS-Client:Yahoo-BOSS-Client为Yahoo Search API提供一个面向对象的接口。这个PHP5.3包可以取得网页、新闻和图片的搜索结果,还可以缓存搜索结果。
    PHP.JS:PHP.JS是一个让开发人员能够在客户端调用服务器端PHP函数的javascript框架。
    lilURL:lilURL是一个简单的使用PHP/MySQL搭建的用于生成短网址的工具,和TinyURL、Shorl、MakeAShorterLink 类似,可在自己的服务器中运行,支持mod_rewrite。
    phpVirtualBox:phpVirtualBox是VirtualBox用户界面的一个开源Ajax实现。它可以让你访问和控制远程VirtualBox实例。
    Picok:Picok(personal information cockpit)是一个用于创建类似于iGoogle个性化首页的PHP开源系统。Picok基于PHP(Zend Framework),YUI开发。支持BM Lotus Notes,多用户,多国语言,多种数据库(MySQL、Microsoft SQL Server)。
    JAXL:Wiki Web Help是一个基于Ajax的Wiki百科系统,整个系统和操作都设计成类似于一个CHM文档阅读器。它的布局是由带有Tab的两个分隔开的面板组成,用于搜索,索引浏览,显示内容(以Tree的形式显示)。用户可以创建和修改主题,页面可以被标记以便于索引创建,搜索的结果高亮显示。
    phpMemCacheAdmin:phpMemCacheAdmin是一个采用PHP开发的Memcached服务器监控和调试管理工具。
    PHP Excel Reader:PHP Excel Reader能够获取XLS文件中任意单元格的值和格式。