我很高兴使用 rsync 来备份我的服务器,尽管我对--delete-excluded参数有疑问。
/usr/bin/rsync -a --delete --numeric-ids --relative --delete-excluded --rsh=/usr/bin/ssh root@server01:/etc /.snapshot/hourly.0/server01
Run Code Online (Sandbox Code Playgroud)
来自man rsync:
--delete-excluded also delete excluded files from dest dirs
Run Code Online (Sandbox Code Playgroud)
对我来说,一个非英语母语者,这意味着 rsync 将从远程服务器上的实际目标目录中删除排除的目录,所以如果我有/home/backup并且/home/settings在我的排除文件夹中,这些文件夹实际上将从远程服务器中删除。
从其他几个资源来看,它似乎会从本地备份文件夹中删除文件以节省空间。例如,您可以在服务器本身上创建小型备份并排除这些数据,这样您就不会浪费存储空间。
尽管 rsync 只能以一种方式完成它的工作,但对我来说这很重要,因为人们说它可以正常工作,但我不想在拥有删除远程服务器上的文件/目录的软件时冒任何风险。
当我使用以下命令重新启动网络时:
/etc/init.d/networking restart
Run Code Online (Sandbox Code Playgroud)
我收到此警告:
Running /etc/init.d/networking restart is deprecated because it may not enable again some interfaces
Run Code Online (Sandbox Code Playgroud)
那么现在进行更改后重新启动网络的最佳方法是什么?
这个问题也适用于 Debian,因为 netbase 包是从 debian 继承的。
我有一个 Ubuntu 8.04 LTS 服务器。有几个包分别是“忍住了”(“以下更新已存回”),当我做的apt-get upgrade。我的理解是我可以apt-get dist-upgrade升级这些软件包,但我有一些担忧:
如果我这样做dist-upgrade,我会从 8.04 升级到更高版本(我猜是 8.10)吗?如果是这样,8.04 成为“长期支持”(LTS)的意义何在?
这是一个“危险”的过程吗?我假设包被保留,因为它们依赖于新包。是dist-upgrade简单地拉取新软件包并进行相当简单的升级,还是有需要注意的问题?
随着rpm -qV openssh-server我将获得与默认值相比已更改的文件列表。
~$ rpm -qV openssh-server
S.?....T. c /etc/ssh/sshd_config
~$
Run Code Online (Sandbox Code Playgroud)
可以dpkg在 Ubuntu 上做同样的事情吗?
好吧,这让我毛骨悚然 - 我看到了大约 1500-2500 个:
root@wherever:# netstat
Proto Recv-Q Send-Q Local Address Foreign Address State
tcp 0 0 localhost:60930 localhost:sunrpc TIME_WAIT
tcp 0 0 localhost:60934 localhost:sunrpc TIME_WAIT
tcp 0 0 localhost:60941 localhost:sunrpc TIME_WAIT
tcp 0 0 localhost:60947 localhost:sunrpc TIME_WAIT
tcp 0 0 localhost:60962 localhost:sunrpc TIME_WAIT
tcp 0 0 localhost:60969 localhost:sunrpc TIME_WAIT
tcp 0 0 localhost:60998 localhost:sunrpc TIME_WAIT
tcp 0 0 localhost:60802 localhost:sunrpc TIME_WAIT
tcp 0 0 localhost:60823 localhost:sunrpc TIME_WAIT
tcp 0 0 localhost:60876 localhost:sunrpc TIME_WAIT
tcp 0 0 localhost:60886 localhost:sunrpc …Run Code Online (Sandbox Code Playgroud) 我已经在我的 debian 6 服务器上设置了 ispconfig3,这里有一个通过 ssl 的 smtp:
服务器是后缀
AUTH PLAIN (LOL!)
235 2.7.0 Authentication successful
MAIL FROM: lol@lol.com
250 2.1.0 Ok
RCPT TO: lol@lol.com
RENEGOTIATING
depth=0 /C=AU/ST=NSW/L=Sydney/O=Self-Signed Key! Procees with caution!/OU=Web Hosting/emailAddress=postmaster@lol.com
verify error:num=18:self signed certificate
verify return:1
depth=0 /C=AU/ST=NSW/L=Sydney/O=Self-Signed Key! Procees with caution!/OU=Web Hosting/emailAddress=postmaster@lol.com
verify return:1
DATA
554 5.5.1 Error: no valid recipients
Run Code Online (Sandbox Code Playgroud)
但是,问题是,如果我只是通过端口 25 执行 vanilla telnet,我可以像疯子一样进行身份验证和发送邮件......希望这是足够的信息!(与“mail.app 无法处理 ssl!”相反)
我正在发布的 .deb 包期望它可以调用 lsb_release。一位使用 Debian 6.0.5 的客户表示 lsb_release 命令(甚至在终端中)会产生命令未找到错误。这是标准还是他的 Debian 构建有问题?
我通过 Google Compute Engine 中的 Bitnami 创建了一个 VM。以前,我可以通过 Bitnami Web 界面进行 ssh。我试图通过 Mac 上的终端 ssh,但一直收到Permission denied (publickey)错误消息。然后我删除了服务器和我的 Mac 上的所有密钥,并从 bitnami 下载了 pem 文件并使用-i了连接选项,但问题仍然存在。
ssh -i bitnami-gce.pem xxx@1xx.1xx.5x.1xx -v
Run Code Online (Sandbox Code Playgroud)
完整的调试信息:
OpenSSH_6.2p2, OSSLShim 0.9.8r 8 Dec 2011
debug1: Reading configuration data /etc/ssh_config
debug1: /etc/ssh_config line 20: Applying options for *
debug1: Connecting to 1xx.1xx.5x.1xx [1xx.1xx.5x.1xx] port 22.
debug1: Connection established.
debug1: identity file bitnami-gce.pem type -1
debug1: identity file bitnami-gce.pem-cert type -1
debug1: Enabling compatibility mode for protocol …Run Code Online (Sandbox Code Playgroud) debian ssh ssh-keys google-compute-engine google-cloud-platform
我的环境:
# uname -a
Linux app11 4.9.0-5-amd64 #1 SMP Debian 4.9.65-3+deb9u2 (2018-01-04) x86_64 GNU/Linux
#
# cat /etc/*release
PRETTY_NAME="Debian GNU/Linux 9 (stretch)"
NAME="Debian GNU/Linux"
VERSION_ID="9"
VERSION="9 (stretch)"
ID=debian
HOME_URL="https://www.debian.org/"
SUPPORT_URL="https://www.debian.org/support"
BUG_REPORT_URL="https://bugs.debian.org/"
#
Run Code Online (Sandbox Code Playgroud)
在尝试运行时apt-get update,我收到了一堆错误:
# apt-get update
Ign:1 http://deb.debian.org/debian stretch InRelease
Hit:2 http://security.debian.org stretch/updates InRelease
Hit:3 http://deb.debian.org/debian stretch-updates InRelease
Hit:4 http://deb.debian.org/debian stretch-backports InRelease
Hit:5 http://deb.debian.org/debian stretch Release
Get:6 http://packages.cloud.google.com/apt cloud-sdk-stretch InRelease [6,377 B]
Ign:7 https://artifacts.elastic.co/packages/6.x/apt stable InRelease
Hit:8 https://artifacts.elastic.co/packages/6.x/apt stable Release
Get:9 http://packages.cloud.google.com/apt google-compute-engine-stretch-stable InRelease [3,843 B]
Get:10 …Run Code Online (Sandbox Code Playgroud) 总结一下:我有一个专用服务器,有几个朋友在运行带有 web gui 的 Torrent 客户端。每个用户都在服务器上以他们的用户名运行一个客户端,因此下载进入他们的用户目录,只有他们才能访问自己的文件等。
如何在每个用户的基础上监控和限制每月的带宽?
我在想也许一定有一种使用 iptables 的方法。并且通过监控用户 X 的所有进程使用的带宽。如果他们使用的带宽超过了他们每月允许的 Y GB 带宽,他们会收到一条消息,说他们的 torrent 客户端的网络被阻止,或者客户端被完全杀死。我也考虑过鱿鱼,但看到它会使用多个 Torrent 客户端,这可能会使用大量服务器资源......
我正在使用 debian lenny。
我不知道该怎么做...
这可能吗?我很感激即使只是部分解决方案......