Solved

Create a backup from a remote computer to a local computer using tar

Posted on 2004-04-12
1
217 Views
Last Modified: 2013-12-15
I have a remote computer (named RemoteLinux) that I want to backup onto my local computer  (named LocalLinux), preferably using tar and ssh.  The remote computer is running RedHat 7.3.  The local machine runs RedHat 9.

I ssh through a vpn tunnel.  The RemoteLinux address is 192.168.200.12.  The LocalLinux address is 192.168.70.5.  I want to backup the /home/shared folder.

Thank you,
Earl
0
Comment
Question by:earlearle
1 Comment
 
LVL 40

Accepted Solution

by:
jlevie earned 500 total points
ID: 10806941
What you'll want to do is to onpen an ssh session to the remote and then execute:

cd /home
tar czf - shared-dir | ssh LocalLinux dd of=shared-dir.tar.gz

This does require that you are able to open an ssh session from RemoteLinux to LocalLinux. If that's not possible and you have sufficient free space on the remote you could open an sshe session to RemoteLinux and do:

cd /home
tar cvzf shared-dir.tar.gz shared-dir
exit

Then from LocalLinux do:

scp RemoteLinux:/home/shared-dir.tar.gz .
0

Featured Post

Top 6 Sources for Identifying Threat Actor TTPs

Understanding your enemy is essential. These six sources will help you identify the most popular threat actor tactics, techniques, and procedures (TTPs).

Join & Write a Comment

Suggested Solutions

Currently, there is not an RPM package available under the RHEL/Fedora/CentOS distributions that gives you a quick and easy way to allow PHP to interface with Oracle. As a result, I have included a set of instructions on how to do this with minimal …
Using 'screen' for session sharing, The Simple Edition Step 1: user starts session with command: screen Step 2: other user (logged in with same user account) connects with command: screen -x Done. Both users are connected to the same CLI sessio…
Learn how to get help with Linux/Unix bash shell commands. Use help to read help documents for built in bash shell commands.: Use man to interface with the online reference manuals for shell commands.: Use man to search man pages for unknown command…
Learn how to navigate the file tree with the shell. Use pwd to print the current working directory: Use ls to list a directory's contents: Use cd to change to a new directory: Use wildcards instead of typing out long directory names: Use ../ to move…

707 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

19 Experts available now in Live!

Get 1:1 Help Now