Backup your virtual server through ssh to another cloud server

We offer a number of awesome features  our users can take advantage of so they can experience the true flexibility and control we believe they deserve. However, sometimes , we have some server administrators that would really prefer to do some tasks only on the command line  and call it a day. And although we offer a number of simple to use, intuitive features to  make server administrating as easy as possible, they have become hard wired with preferring to  run a command or two to find the solution they need.

We recently added new backup features in our portal that would allow users to make on-demand backups, scheduled backups, restore the server from a backup created, and even make a customized template from a backup. And despite how incredibly easy  these features are, a handful of  our Linux users still prefer to run their run backups through cron or SSH to another server. So for example, if they had a server in the UK and wanted to make sure they had access to their files at any time regardless of the status of their server, they would backup the server through SSH to a server in Toronto.

Occasionally, Support will receive a ticket from a client curious on how to backup the server through ssh. And all though we recommend to all clients that they take advantage of our backup utility in the Zunicore User portal, we offer our users the following command for backing up a server over ssh :

tar -cvpzf backup.tar.gz --exclude=/backup.tar.gz --exclude=/proc --exclude=/lost+found --exclude=/sys
 --exclude=/mnt --exclude=/media --exclude=/dev / | ssh username@IPADDRESS "(cat >filename.tar.gz)"
 
  • tar    command to create the archive
  • -c    create a new backup
  • -v    verbose mode
  • -p    preserves the permissions of the files
  • -z    compress the backup file with gzip
  • -f    the  file name
  • -exclude=    which directories to exclude from the backup.  This can change depending what you would like to achieve and what directories you need backed up.
  • |    pipe the output of tar through ssh  which will then run the cat command on Server B
  • ssh    remotely execute cat on the remote server to create the file name
  • username    the account on the remote server with root priviledges
  • IP   Address    the remote server you are backing up  to
  • filename    the destination file name you wish to give to the new backup on the remote server

In the above example, we have backed up the entire ServerA (excluding mounted directories, lost and found, proc, and media) to ServerB. We provide the back up a distinguishable name we can easily search for when we need to find the file for quick reference.

Once the command has finished, you can log in to the backup server (ServerB) and check if the backup was copied over.

0 Responses to “Backup your virtual server through ssh to another cloud server”



  1. Leave a Comment

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




Twitter Updates

  • @PoonHealey Hello, We do not offer phone support for the Zunicore platform. You can get a hold of us with live chat. Live chat is av... 1 year ago
  • @artifaktCom Hello, An API will be available soon that will allow you to obtain this output. Right now, the API is undergoing signifi... 1 year ago
  • @jonathansuter Hello, We can reply back with any answers you need. Please update this with any questions that you have. 1 year ago
  • @RyanCorner Hello, We will forward this information to our development team. We will update this ticket when completed. 1 year ago
  • @beagile Hello, You would have to use the templates we offer. But if you spin up two VHDs on the server, you can always copy the data... 1 year ago
  • @indiejustin Hello Justin, Can you create a ticket in our internal system so i can verify you and then determine the issue of the VM. 1 year ago
  • @kangawallafox Hello Shaun. I am not seeing a ticket under your name. Please respond to the ticket via the user portal and we will respond. 1 year ago
  • @josephoenix Hello Joseph. Please submit a ticket to [email protected] stating you'd like to deactivate your account and we'll handle it. 1 year ago
  • @Open_Universe That is great to hear. If any assistance is needed, please let us know. Have a great day and enjoy your time in the cloud! 1 year ago
  • @Open_Universe If you can provide the email address that is associated with your account, we will create a ticket and inform you when ready 1 year ago

Follow

Get every new post delivered to your Inbox.

%d bloggers like this: