backup database on nearlyfreespeech.net
mysqldump -u jsmith -p -h tingda.db pengyou > backup/pydb
-u username
-p passwrd, don't enter passowrd here
-h host. usually in the form of someting.db
pengyou > backup/pydb
save database pengyou to backup directory with filename pydb
reference: http://www.modwest.com/help/kb6-241.html
import database
mysql -h localhost DATABASE < YOURFILE.sql
nearlyfreespeech.net上计算流量费用的页面
https://www.nearlyfreespeech.net/services/bwcalc.php
因为这个网站服务商的原则是用的流量越多越便宜
https://www.nearlyfreespeech.net/services/hosting.php#pricing
我多个站点在上面,流量在每个月3g-5g之间,现在费用是每月3美元左右。
我计算了一下,按现在流量再用一年应该便宜到每月2美元不到。:)
nearlyfreespeech.net的api
https://api.nearlyfreespeech.net/wiki/pmwiki.php/API/Reference
我的理解是通过api自己写些带脉可以方便查询各种信息并更发方便地获取那些信息。比如把自己常用的需要查询的信息都生成到一个页面,这样就不用每次登录网站点那么多此鼠标了。而且由于是自动的,比如我上面管着20个站点,通过api每隔一段时间自动出查我帐号各个站点的状态,如果状态不对就报告。这样使用会很方便。
** nearlyfreespeech.net 提供自动备份服务了
New offsite dead-drop backup service
好处。
- 自动
- 保护隐私,可以gpg加密
- 便宜。还是用多少交多少钱那种,没有起价这类最低消费。
> The pricing for this service is 225,000 kilobyte-days per $0.01, which works out to be just under $1.40 per rsync.net-stored gigabyte per (30-day) month.
考虑使用。我自己现在都没备份。嫌麻烦。:)
这样,灾难来的时候,就全晚了。也全完了。
早早开始吧。
** 如何解决drupal多站点使用squid之类cache/proxy出现站点错乱的现象
Multi-site hosting with Drupal
Drupal has a feature that allows multiple sites to be served from a single installation. This feature can be used at NearlyFreeSpeech.NET, but by default it will run afoul of the distributed caching network. To make this feature work properly, add the following line to your .htaccess file:
Header append Vary Host
This will indicate to web caches that the responses you send may depend on the Host: header, which contains the name of the site being requested.
https://members.nearlyfreespeech.net/wiki/Applications/Drupal
我的站点都在nearlyfreespeech,上面一套drupal代码跑多个站点确实出现了类似问题。按照说明,在.htaccess文件加上 Header appen Vary Host,就好了。