• Skip to primary navigation
  • Skip to main content

Bryan Strawser

  • About Me
  • Academics & Research
  • Work
  • Contact
You are here: Home / General / Backing up with tar and

Backing up with tar and

by Bryan Strawser · Apr 27, 2003

Backing up with tar and ssh. bbum: I found myself in a situation where I really needed to copy some files from a remote OS X box to my local system, but the only access I had was via SSH. Unfortunately, the files all have resource forks that contain pertinent information.

You can probably do this all at once:

  ssh remote.server.com -c 'gnutar cvp file1 file1/rsrc file2 file2/rsrc file3 file3/rsrc' | gnutar -x -v -p --overwrite

Here are some other handy ones:

– back up a remote directory to a local tarfile over a slow link

  ssh remote.server.com -c 'tar -cz /path/to/dir/to/back/up' > backup.tar.gz

– back up a remote directory to a local tarfile over a fast link, where the remote PC is very slow

  ssh remotehost -c 'tar -c /path/to/dir/to/back/up' | gzip > backup.tar.gz

Also rsync is great for this sort of thing:

  rsync -vr remote.server.com:/path/to/dir/to/back/up localbackupdir

Comment

[Second p0st]

Filed Under: General

Copyright © 2025 · No Sidebar Pro on Genesis Framework · WordPress · Log in