How do I make a BTRFS incremental backup to multiple source destinations, so I don't have to run btrfs send multiple times?
btrfs send -p /tmp/parent_subvol /tmp/incremental_backup_snapshot | btrfs receive /mnt/destination_drive1
btrfs send -p /tmp/parent_subvol /tmp/incremental_backup_snapshot | btrfs receive /mnt/destination_drive2
in bash:
btrfs send -p /tmp/parent_subvol /tmp/incremental_backup_snapshot | tee >(btrfs receive /mnt/destination_drive2) | btrfs receive /mnt/destination_drive1
(courtesy this answer)
Related
I am trying to connect my RedisInsightsv2 client to a cluster of redis instances.
When the redis instance hasn't joined the cluster yet, redisinsights is able to make a connection.
After the cluster is created however, new connections from the GUI, just fail.
I have 3 shards with 1 replica each:
redis-cli -h 10.9.9.4 -p 7001 --cluster create 10.9.9.4:7001 10.9.9.5:7002 10.9.9.6:7003 10.9.9.4:7004 10.9.9.5:7005 10.9.9.6:7006 --cluster-replicas 1 -a Password
The cluster gets successfully created with the right shards and everything.
I can even verify using the CLUSTER NODES command
root ➜ ~ $ redis-cli -h 10.9.9.4 -p 7004 -a Password
Warning: Using a password with '-a' or '-u' option on the command line interface may not be safe.
10.9.9.4:7004> CLUSTER NODES
5b77b776f0ed08b4f34b0fe3e48b609e4bd8400e 10.9.9.6:7003#17003 master - 0 1662318446553 3 connected 10923-16383
a42f44163b046273ca02b1fc99ed93cf6188f65e 10.9.9.5:7002#17002 master - 0 1662318446755 2 connected 5461-10922
d2b21a37b62283a6cfbd5fb436df505ddc31aea8 10.1.1.10:7001#17001 master - 0 1662318445549 1 connected 0-5460
2cd5783411ceea96b4006b596942cc49484884ab 10.9.9.5:7005#17005 slave d2b21a37b62283a6cfbd5fb436df505ddc31aea8 0 1662318445750 1 connected
61541ad0455539335f27d5a90a5a8e504b3dea5f 10.1.1.11:7004#17004 myself,slave 5b77b776f0ed08b4f34b0fe3e48b609e4bd8400e 0 1662318445000 3 connected
c00d264a625998e89becb9334a1f4ea9d2057a0d 10.9.9.6:7006#17006 slave a42f44163b046273ca02b1fc99ed93cf6188f65e 0 1662318445550 2 connected
10.9.9.4:7004>
However, when trying to connect to any of these in the UI I get the following errors:
9/4/2022, 12:03:31 PM | ERROR | TimeoutInterceptor | Request Timeout. GET /api/instance/9e253e74-0091-44b8-bf8c-29ff0f4f0275/connect | {"stack":[{}]}
9/4/2022, 12:03:41 PM | ERROR | TimeoutInterceptor | Request Timeout. GET /api/instance/9e253e74-0091-44b8-bf8c-29ff0f4f0275/connect | {"stack":[{}]}
OR
9/4/2022, 12:16:17 PM | ERROR | KeysBusinessService | Failed to get keys with details info. Connection is closed.. | {"stack":[{}]}
9/4/2022, 12:16:18 PM | ERROR | ExceptionsHandler | Connection is closed. | {"stack":[{}]}
9/4/2022, 12:16:23 PM | ERROR | ExceptionsHandler | Connection is closed. | {"stack":[{}]}
This is the redis.conf that I use for 10.9.9.5:
port 7002
loadmodule /opt/redis-stack/lib/redisearch.so
loadmodule /opt/redis-stack/lib/redisgraph.so
loadmodule /opt/redis-stack/lib/redistimeseries.so
loadmodule /opt/redis-stack/lib/rejson.so
loadmodule /opt/redis-stack/lib/redisbloom.so
cluster-enabled yes
cluster-config-file cluster-node-2.conf
cluster-node-timeout 5000
dbfilename dump-2.rdb
maxmemory 1862mb
maxmemory-policy allkeys-lru
requirepass Password
masterauth Password
I've done a bunch of googling but I'm not able to determine why this is failing. Any help is appreciated!
RedisInsight version: 2.8.0
Running on: Windows 11
Cluster is running on remote machines part of my local network i.e.
10.9.9.0/24
please specify additional information:
what is your OS
what is the version of RedisInsight? (2.8.0?)
where is your cluster running? (is it local? k8s? any SSH tunnels?)
Can you try and see if you are able to connect using this debug build: https://drive.google.com/file/d/1od2uClDKb0649ixkgyRwXfqj8QLr0GXw/view?usp=sharing
Also please check and comment the logs if it is not working
On some bad days, our application server (Weblogic) tends to get a lot of CLOSE_WAIT sessions.
We have even gone to the extent of restarting our middleware weblogic suite in broadDaylight to get timely fixes since these cause kind of a panic situation.
$ netstat -nat | egrep 'CLOSE_WAIT' | wc -l
412.
Provided that these are just processes, is there a way to kill them without affecting the running of my server?
I came across this script which takes the host:port and claims to kill these sessions, but not sure if this will work on Production environment.
"$ netstat -anp | grep 192.168.0.100 | grep ':80 ' | grep CLOSE_WAIT | awk '{print $7}' | cut -d / -f1 | grep -oE "[[:digit:]]{1,}" | xargs kill"
Any help would be appreciated.
Team,
I am facing some difficulties running commands on a remote machine. I am unable to understand why ssh is trying to think that the command I pass is a host.
ssh -tt -i /root/.ssh/teamuser.pem teamuser#myserver 'cd ~/bin && ./ssh-out.sh'
|-----------------------------------------------------------------|
| This system is for the use of authorized users only. |
| Individuals using this computer system without authority, or in |
| excess of their authority, are subject to having all of their |
| activities on this system monitored and recorded by system |
| personnel. |
| |
| In the course of monitoring individuals improperly using this |
| system, or in the course of system maintenance, the activities |
| of authorized users may also be monitored. |
| |
| Anyone using this system expressly consents to such monitoring |
| and is advised that if such monitoring reveals possible |
| evidence of criminal activity, system personnel may provide the |
| evidence of such monitoring to law enforcement officials. |
|-----------------------------------------------------------------|
ssh: Could not resolve hostname cd: No address associated with hostname
Connection to myserver closed.
It works absolutely fine if I don't pass a command. It simply logs me in. Any ideas?
Man ssh says:
If command is specified, it is executed on the remote host instead of
a login shell.
The thing is that cd is a bash built-in (run type cd in your terminal). So, ssh tries to run cd as a shell, but can not find it in PATH.
You should invoke ssh something like this:
ssh user#host -t 'bash -l -c "cd ~/bin && ./ssh-out.sh"'
rabbitmqadmin list vhosts show messages but there are no queues. Why it is possible?
When I run Celery it still somehow receives messages. How can I see the name of the queue where the messages are stored? What do I miss?
dmugtasimov#dmugtasimov-ThinkPad-Edge-E440 ~ $ rabbitmqadmin -u guest -p guest list vhosts
+---------+----------+----------------+-------------------------+----------+----------+---------+
| name | messages | messages_ready | messages_unacknowledged | recv_oct | send_oct | tracing |
+---------+----------+----------------+-------------------------+----------+----------+---------+
| myvhost | 1 | 1 | 0 | 231903 | 229228 | False |
+---------+----------+----------------+-------------------------+----------+----------+---------+
dmugtasimov#dmugtasimov-ThinkPad-Edge-E440 ~ $ rabbitmqadmin -u guest -p guest list queues
No items
dmugtasimov#dmugtasimov-ThinkPad-Edge-E440 ~ $ sudo rabbitmqctl list_queues
Listing queues ...
...done.
dmugtasimov#dmugtasimov-ThinkPad-Edge-E440 ~ $ rabbitmqadmin -u guest -p guest -V myvhost get queue=celery requeue=true count=10
*** Access refused: /api/queues/myvhost/celery/get
Please, suggest what extra information is required to answer the question.
I met the similar problem. the difference is: my message is "unacknowledged"
e.g. I found my queue has a message:
$ rabbitmqadmin list queues name node messages
+----------------------------+----------------+----------+
| name | node | messages |
+----------------------------+----------------+----------+
| my_queue_name | rabbit#xx-2 | 1 |
but when I run "get" command to show its content, rabbitmq tells me "there's no item"
so, I query it with this command:
$ rabbitmqadmin list queues name node messages messages_ready messages_unacknowledged
+----------------------------+----------------+----------+----------------+-------------------------+
| name | node | messages | messages_ready | messages_unacknowledged |
+----------------------------+----------------+----------+----------------+-------------------------+
| my_queue_name | rabbit#xxxxx-2 | 1 | 0 | 1 |
+----------------------------+----------------+----------+----------------+-------------------------+
I don't know why. just restart the rabbitmq server and everything seems goes fine.
Is there any way to Remove all Redis Client Connections with one command?
I know that it's possible to remove by IP:PORT
CLIENT KILL addr:port
Also I found that is possible to do this since Redis 2.8.12.
But
I couldn't find anything about.
CLIENT KILL can receive TYPE argument that can be one of a three connection types; normal, slave and pubsub.
You can kill all open connections by sending the following three commands:
CLIENT KILL TYPE normal
CLIENT KILL TYPE slave
CLIENT KILL TYPE pubsub
Note that you can skip the later two if you do not use them (slave and pubsub connections).
You can also add a SKIPME no for a kamikaze connections killer.
So SHUTDOWN is definitely the easiest way, especially in dev.
However, although Redis doesn't have a CLIENT KILL * variant, you can script it. AFAIR you could even do it in Lua but I checked now and CLIENT LIST errs so I'm guessing that's changed. Still, it is fairly easy to do this with the CLI - this appears to do the trick:
redis-cli CLIENT LIST | cut -d ' ' -f 2 | cut -d = -f 2 | awk -e '{ print "CLIENT KILL " $0 }' | redis-cli -x
You can use the following command to check your connection numbers:
netstat -an | grep :6379 | grep ESTABLISHED | wc -l
Then try Redis Client command to kill connection:
http://redis.io/commands/client-kill