0

I want to know how to make a simple backup from one server to another.

I have 2 servers (one for websites, the other is empty) and I would make up the folder html (/var/www/html/ of apache) via SSH and SFTP in a folder inside of the home's account that I will create in the empty server.

Then I would do a sync (I heard of rsync command). Once a day will sync for backup.

The backup must be in one copy and if the full server is down for any problems, the synchronization don't delete back in the empty server.

It's possibile?

How can make this procedure safe and fast?

Thanks to the whole Ubuntu Community!!!

Elder Geek
  • 36,752

1 Answers1

0
   Rsync is a fast and extraordinarily versatile file  copying  tool.   It
   can  copy  locally,  to/from  another  host  over  any remote shell, or
   to/from a remote rsync daemon.  It offers a  large  number  of  options
   that  control  every  aspect  of  its behaviour and permit very flexible
   specification of the set of files to be copied.  It is famous  for  its
   delta-transfer  algorithm,  which  reduces the amount of data sent over
   the network by sending only the differences between  the  source  files
   and  the  existing  files in the destination.  Rsync is widely used for
   backups and mirroring and as an improved copy command for everyday use.

   Rsync finds files that need to be transferred  using  a  "quick  check"
   algorithm  (by  default) that looks for files that have changed in size
   or  in  last-modified  time.   Any  changes  in  the  other   preserved
   attributes  (as  requested by options) are made on the destination file
   directly when the quick check indicates that the file’s data  does  not
   need to be updated.

Source: man rsync

Both pull and push methods are available...

Elder Geek
  • 36,752