从EC2实例访问RDS(Access RDS from EC2 instance)
我很难弄清楚如何给一个ec2实例访问RDS实例以执行mysqldump。
我是否需要添加允许ec2实例访问该服务器的安全组? 我尝试使用RDS端点,但它不允许。
I am having a hard time figuring out how to give an ec2 instance access to an RDS instance in order to perform a mysqldump.
Do I need to add a security group that allows the ec2 instance access to that server? I tried this using the RDS endpoint and it would not allow.
原文:https://stackoverflow.com/questions/33026931
最满意答案
查找大文件(具有名称)的技巧通常是
du -a
,通常用于sort -n
。 这最后会为您提供最大的文件(因此小文件从页面顶部消失并不重要)。你可能还有一个进程仍然在运行时打开一个无名文件,当它有机会时它正在写入,这就是占用空间。 这可能是它打开以存储数据的临时文件,也可能是某人删除的日志文件。 它使用的空间不会显示为可用空间,但它也不会显示为与
du -a
(或任何其他选项)一起使用,因为没有文件名。 如果您不知道它是哪个进程,则可以使用重新启动来停止进程(所有进程),从而释放空间。The trick for finding the big files (that have names) is usually
du -a
, often piped intosort -n
. This gives you the biggest files last (so it doesn't matter that the small files disappear off the top of the page).You may have a process still running with a nameless file open that it is writing to when it gets the chance, that is eating up the space. This could be a temporary file that it opened to store data, or it could be a log file that someone removed. The space it uses won't show as free space, but neither will it show up as in use with
du -a
(or any other options) because there isn't a file name. If you don't know which process it is, you could use a reboot to stop the process (all processes), thereby releasing the space.
相关问答
更多-
所以在理论上, prealloc文件是预先分配的日志文件。 这与使用格式为j._X日志文件j._X ,其中X是数字。 这里的目标是在最后一个文件用完空间时,已经分配了“下一个”文件。 预配置通常比按需分配快得多。 删除这些或移动它是否可以安全? 你所寻求的答案是在这里的文件。 那里的文档似乎提供了你的问题的关键答案: 预分配文件不包含数据,而是简单地预先分配的文件,这些文件是准备使用的,这些文件是由文件系统真正预先分配的(即它们不是“稀疏”)。 因此,删除它们是安全的,但是如果您使用日志记录重新启动mong ...
-
尝试此脚本 - 它将列出数据行中所有表的行数和空间(以及使用的总空间): SELECT t.NAME AS TableName, i.name AS indexName, SUM(p.rows) AS RowCounts, SUM(a.total_pages) AS TotalPages, SUM(a.used_pages) AS UsedPages, SUM(a.data_pages) AS DataPages, (SUM(a.total_pages) * 8) / 1024 AS T ...
-
如果[[!(what is if [[ ! $1 =~ ^# ]]; in unix)[2022-04-07]
根据http://wiki.bash-hackers.org/syntax/ccmd/conditional_expression,=〜是:=~ 将根据扩展正则表达式 进行检查 - 匹配时为TRUE 所以^#是一个扩展的正则表达式。 因为#不是扩展正则表达式中的特殊字符。 if的含义检查$1中的字符串不以#开头。 所以在命令行上 $ if [[ ! '#' =~ ^# ]]; then echo matches; else echo no match; ... -
在unix中连接多个文件(joining multiple files in unix)[2022-12-13]
怎么样: paste keyfile <(cut -d' ' -f2 file1) <(cut -d' ' -f2 file2) ... <(cut -d' ' -f2 fileN) how about: paste keyfile <(cut -d' ' -f2 file1) <(cut -d' ' -f2 file2) ... <(cut -d' ' -f2 fileN) -
我终于找到了这个错误 - 正如我所料,它是非常愚蠢的: 我正在将这些变化合并到错误的背景中。 I finally found the bug - and as I expected, it was quite stupid one: I was merging the changes into the wrong context.
-
没关系,因为12k产品至少有12k的图像。 如果您的产品图片的平均值为200kb,那么您可能仅为您的产品图片消耗2.4GB 。 检查这个目录 magento/media/* 你的产品中有许多未压缩的图像。 你应该 缩小所有图像以压缩使用的大磁盘空间。 试试jpegmini.com 缩小最近从未更新的js和css 。 为您的网站提供更快的性能。 It's ok because with 12k products you have 12k of images at least. if average of t ...
-
查找大文件(具有名称)的技巧通常是du -a ,通常用于sort -n 。 这最后会为您提供最大的文件(因此小文件从页面顶部消失并不重要)。 你可能还有一个进程仍然在运行时打开一个无名文件,当它有机会时它正在写入,这就是占用空间。 这可能是它打开以存储数据的临时文件,也可能是某人删除的日志文件。 它使用的空间不会显示为可用空间,但它也不会显示为与du -a (或任何其他选项)一起使用,因为没有文件名。 如果您不知道它是哪个进程,则可以使用重新启动来停止进程(所有进程),从而释放空间。 The trick f ...
-
1)你可以试试WinDirStat: http ://windirstat.info/ 2)我认为您不需要开源工具,只需使用已经提供的语言,就可以用Java或.NET编写。 1) You can try WinDirStat: http://windirstat.info/ 2) I don't think you need open source tools, you could write it in Java or .NET just by using what is already provided ...
-
经过几轮代码分析,我发现了RAM泄漏的地方。 首先,如果我想经常查询"eng"字段,我应该通过这样做为该字段创建索引: v7.ensure_index([("eng",1),("unique",True)]) 这解决了在未编制索引的"eng"字段中进行连续搜索所花费的时间。 其次,出血RAM问题是由于这个代价高昂的函数调用: doc = {"uid":uid,"eng":src,trglang:trg} if counter == 1000: for i in database.find(): ...
-
减去2个地震unix文件(subtracting 2 seismic unix files)[2022-12-07]
我在Earthscience stackexchange上寻找了一个交叉帖子,但没有看到它。 无论如何,你有两种方法可以减去两个文件,假设它们在跟踪数量,每条跟踪样本和采样率方面是相同的: sudiff file1.su file2.su > diff.su 要么: suop2 file1.su file2.su op=diff > diff.su 它们是等价的。 I looked for a cross-post on the Earthscience stackexchange but didn't ...