Solved

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

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

Efficient way to get backups off site to Azure

This user guide provides instructions on how to deploy and configure both a StoneFly Scale Out NAS Enterprise Cloud Drive virtual machine and Veeam Cloud Connect in the Microsoft Azure Cloud.

Question has a verified solution.

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

Suggested Solutions

rdate is a Linux command and the network time protocol for immediate date and time setup from another machine. The clocks are synchronized by entering rdate with the -s switch (command without switch just checks the time but does not set anything). …
It’s 2016. Password authentication should be dead — or at least close to dying. But, unfortunately, it has not traversed Quagga stage yet. Using password authentication is like laundering hotel guest linens with a washboard — it’s Passé.
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.

831 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