Solved

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

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

Backup Your Microsoft Windows Server®

Backup all your Microsoft Windows Server – on-premises, in remote locations, in private and hybrid clouds. Your entire Windows Server will be backed up in one easy step with patented, block-level disk imaging. We achieve RTOs (recovery time objectives) as low as 15 seconds.

Question has a verified solution.

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

Network Interface Card (NIC) bonding, also known as link aggregation, NIC teaming and trunking, is an important concept to understand and implement in any environment where high availability is of concern. Using this feature, a server administrator …
Introduction We as admins face situation where we need to redirect websites to another. This may be required as a part of an upgrade keeping the old URL but website should be served from new URL. This document would brief you on different ways ca…
Learn several ways to interact with files and get file information from the bash shell. ls lists the contents of a directory: Using the -a flag displays hidden files: Using the -l flag formats the output in a long list: The file command gives us mor…
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.

929 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

11 Experts available now in Live!

Get 1:1 Help Now