Welcome to the most active Linux Forum on the web.
Go Back > Forums > Linux Forums > Linux - Newbie
User Name
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!


  Search this Thread
Old 01-09-2012, 05:29 PM   #1
LQ Newbie
Registered: Jan 2012
Location: Boulder, CO
Posts: 1

Rep: Reputation: Disabled
Creating a .tgz archive on a remote server from local files?

Hello all, I'm wondering if it's possible to create a .tgz file from local files onto a remote server where I'm attempting to backup data. My local machine lacks the space necessary to create the archive locally before uploading. The command I was trying with was
tar "directory location" | ssh "cat>backup.tgz"
but the printout is "tar: Cowardly refusing to create an empty archive." I know the directory itself is fine, attempting a local .tgz works with the same path. I'm sure I've missed something obvious, but any help or suggestions (or dire warnings) you can give would be most appreciated. Thanks in advance!
Old 01-09-2012, 05:53 PM   #2
LQ Guru
Registered: Apr 2005
Posts: 5,818

Rep: Reputation: 1004Reputation: 1004Reputation: 1004Reputation: 1004Reputation: 1004Reputation: 1004Reputation: 1004Reputation: 1004

Instead of using ssh itself, use scp to directly transfer over. Should work that way for you; I would verify, but I'm currently at work.




Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
Error trying to extract a tgz archive gemboek Linux - Newbie 4 09-18-2011 03:26 PM
Add mysqldump to exisiting archive.tgz pe_ Linux - Newbie 3 02-04-2010 04:37 PM
[SOLVED] Creating local NFS mounted home directory for remote LDAP authenticated user someshpr Linux - Newbie 2 12-15-2009 06:14 PM
shell script to compare filese b/w local and remote and delete files from local serve dsids Linux - Networking 9 08-23-2006 07:20 AM
Creating RPM's from .tgz files kaplan71 Linux - General 1 03-24-2005 08:23 PM > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 06:14 AM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration