Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people, just like you, are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
Solved

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

Posted on 2004-04-12
1
220 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

Master Your Team's Linux and Cloud Stack

Come see why top tech companies like Mailchimp and Media Temple use Linux Academy to build their employee training programs.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

I am a long time windows user and for me it is normal to have spaces in directory and file names. Changing to Linux I found myself frustrated when I moved my windows data over to my new Linux computer. The problem occurs when at the command line.…
SSH (Secure Shell) - Tips and Tricks As you all know SSH(Secure Shell) is a network protocol, which we use to access/transfer files securely between two networked devices. SSH was actually designed as a replacement for insecure protocols that sen…
Learn how to find files with the shell using the find and locate commands. Use locate to find a needle in a haystack.: With locate, check if the file still exists.: Use find to get the actual location of the file.:
Get a first impression of how PRTG looks and learn how it works.   This video is a short introduction to PRTG, as an initial overview or as a quick start for new PRTG users.

839 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