How to copy file from one server to another server in goteleport? - scp

I am using Teleport (https://goteleport.com/) for my servers.
Basically I can copy file from server to my local pc (and vice versa) using tsh scp command.
But I want to copy file from one server to another server through Teleport. In this case, what is the command I should use?

Related

How to restore SQL Server backup I taken it from a PC with Windows authentication to another PC which also uses Windows authentication

I have taken a backup from a PC has localhost server with Windows authentication, and I want to restore this backup to another PC which has a localhost server with Windows authentication.
I tried to restore it from SQL Server Management Studio, but it does not appear like other .bak files I mean when you choose a backup file to restore all files with (.bak) extension will appear and as i noteced only backup files who created by same PC will apear, as I know this problem is because a connection string is different from first PC to second PC.
Is there anyway to restore it?
And I don't want to make a script file, I need it as backup file, anyone help please.

Kafka data copy from one server to another

My kafka version is 0.8.2.
Now I want to copy data from Server A to Server B, and then expect kafka in Server B works the same as in Server A.
I try to copy all data in $log.dirs which include kafa-logs and zookeeper.
But it doesn't work.
Is it possible that just copy some data files, and then make it works fine in Server B as in Server A ?
Just like I copy a sql dump file from production and run into my local mysql server, then it will works same as in production server.
try kafka's kafka-mirror-maker,like this,
>bin/kafka-mirror-maker.sh
--consumer.config consumer.properties
--producer.config producer.properties --whitelist my-topic
https://kafka.apache.org/documentation.html#basic_ops_mirror_maker
consumer.properties is server A's config,you can modify zookeeper.connect to server A's zookeeper
producer.properties is server B's config,you can modify bootstrap.servers to server B's
whitelist is topic which you want to copy from.

How to save a file to a local machine that you are editing via SSH

Here is my situation:
At work I have to ssh into a server from various different machines. I frequently need to update the file on the remote machine but also save a copy locally (on whichever machine at work I am using).
I usually use emacs on the server I have ssh into but not always.
Is there a direct way to save the file I edited while ssh'd into the server on my local machine? I.e. pipe it to my local machine somehow?

Copy database to the local machine - ORACLE

I need to copy the entire database (Shema, object, data) from the server to my local machine for testing purposes. I know that there should be development database on the server, but I need to have another copy on my machine. The database is 11g and I am using SQL developer. I only found this tutorial. However, I think it creates another copy on the server and does not transfer it to the local machine. Any help is deeply appreciated.
You need to have installed ORACLE database server on your local machine first.
Then you can use exp/imp or expdp/impdp utilities for copying entire database or schema/user.
For example how to use data pump (expdb) see this section in Oracle documentation.
you can use the exp/imp utility
exp userid=user/pass#prod full=y file=full.dump
imp userid=user/pass#dev full=y file=full.dump
datapump is running server side and is faster but then you would have to access the file system to get the dump. If you have access to the server it's the same command just impdp`expdp` running from the host.

how to open multiple connections on multiple servers in the same ssms instance using batch file

I have a lot of sql server 2008 servers with many databases on each server.
I usually forget which database is on which server.
I want to create a batch file named after the name of the database that opens a connection to this database in the currently opened SSMS instance and not in a new instance.
I found a better solution than creating a batch file to handle my problem.
I've registered all my database servers in the Registered Servers window under one Server Group and exported it to a file.
When I need to connect to an instance of them in the Object Explorer I just double-click the instance in the Registered Servers window.
When I need to write some sql code to be executed on an instance of them, I create a new Sql Server Scripts project, add my connections to the project and add sql files to write and save my daily scripts.