Magento:备份建议

发布于 2024-12-21 05:11:09 字数 303 浏览 0 评论 0原文

这也适用于任何电子商务系统,例如 Magento。

我安装了新的 Magento,当客户询问我有关备份的问题时,我希望做好准备。我知道所有(或大多数)备份方法,以及每种类型受保护的各种位,但是我担心的是未结订单。如果进行恢复,最近一次数据库备份后下的订单会发生什么情况?我认为数据库备份会将未结订单存储在系统上,但显然我不能每时每刻都进行和存储备份。

那么,如果数据库损坏并需要恢复,那么上次备份后执行的订单会发生什么情况呢?我认为至少有可能会丢失一些订单。我错了吗?如果不是,那么标准做法是什么?我的客户销售的商品并不便宜,因此典型的订单至少为数百(欧元)。

This could just as well apply to any ecommerce system such as Magento.

I have a new Magento installation and I want to be prepared for when the client asks me about backups. I am aware of all (or most) of the methods of taking backups, and also the various bits that are protected by each type, however the concern I have is to do with open orders. What happens to orders placed after the most recent DB backup in the event of a restore? I presume a DB backup would store the open orders on the system, however obviously I cant be taking and storing backups every second of the day.

So what happens to the orders taken after the last backup if the database gets corrupted and needs to be restored? I presume there'd be at least a chance that some orders might be lost. Am I wrong? If not, then what is standard practice for this ? The goods my client is selling are not that cheap, so typical orders are at least into hundreds (of euro).

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

临走之时 2024-12-28 05:11:09

我知道答案已经被选择,但对于其他可能到这里的人,我也可以提出一些意见。

我更喜欢 magento 的夜间备份。这不是为了保存记录,而是为了狗屎达到顶峰类型的场景。如果情况真的很糟糕,您最好尽快让商店开业并运营,并担心商店开业后未结订单和销售信息丢失。

备份脚本很粗糙,但它会在您可以用于备份的目录中创建数据库和文件目录的 gzip 副本。它将月份和日期附加到文件中。您需要确保用户具有正确的权限来 tar magento 文件结构。

!/bin/sh
m_user='databaseusername'
m_pass='databasepasswd'
db_name='databasename'
od='/home/user/backups/website/' #output directory of the backups
id='/var/www/html/' #the location of the site
name=$od$db_name
name+="_"
mysqldump --opt -u $m_user -p$m_pass $db_name | gzip -c | cat > $name$(date +%m-%d).sql.gz; tar -zcvf $name$(date +%m-%d).tar.gz $id

我还获取所有订单、客户和商品信息并将它们存储在单独的服务器中,但这是出于不同的业务目的。

I know the answer was already selected, but for others that may go here I may as well throw in some input.

I prefer nightly backups for magento. This isn't for record keeping, but it's for shit hits the roof type senarios. If something really goes bad, you're better off getting the store up and running ASAP and worrying about open orders and lost sales information once the store is up.

The backup script is crude, but it makes a gziped copy of the database and file directory in a directory that you can make for backups. It appends the month and day to the files. You need to make sure the user has the correct permissions to tar the magento file structure.

!/bin/sh
m_user='databaseusername'
m_pass='databasepasswd'
db_name='databasename'
od='/home/user/backups/website/' #output directory of the backups
id='/var/www/html/' #the location of the site
name=$od$db_name
name+="_"
mysqldump --opt -u $m_user -p$m_pass $db_name | gzip -c | cat > $name$(date +%m-%d).sql.gz; tar -zcvf $name$(date +%m-%d).tar.gz $id

I also grab all order, customer, and item info and store them in a separate server, but it's for a different business purpose.

饭团 2024-12-28 05:11:09

我现在能想到两件事:

1)设置复制。这将确保您的备份始终是最新的,并且在主服务器发生问题时您可以快速切换到从服务器。

2) 订单完成后自动导出订单。您可以利用 magento 的事件/观察者实现将订单导出到其他系统或仅将普通副本发送到某个电子邮件地址,具体取决于您想要备份的内容。

There are 2 things I can think of right now:

1) Setup replication. This will ensure that your backup is always up to date and that you can quickly switch to the slave in case something happens to the master.

2) Export an order automatically, once an order is completed. You can make use of magento's event/observer implementation to export orders to other systems or to just send plain copies to some email address, depending on what exactly you want to backup.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文