Home > Linux, Useful commands > Backup remote server using tar and ssh

Backup remote server using tar and ssh

ssh user@server "sudo tar cvzp - / --same-owner --exclude=/proc/* --exclude=/media/* --exclude=/dev/* --exclude=/mnt/* --exclude=/sys/* --exclude=/tmp/* --ignore-failed-read" > backup.tgz

user should have sudo rights without password on remote machine.

Categories: Linux, Useful commands
  1. 16/06/2015 at 02:11

    Simply desire to say your article is as astonishing. The clearness in your post is just nice and i could assume you’re an expert on this subject.

    Fine with your permission let me to grab your RSS feed to keep up to date
    with forthcoming post. Thanks a million and please
    continue the enjoyable work.

  1. No trackbacks yet.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: