[MASOCH-L] rsync com --backup e --backup-dir

Henrique de Moraes Holschuh hmh at hmh.eng.br
Thu Jul 2 15:35:36 BRT 2015


On Thu, Jul 2, 2015, at 14:06, Guilherme Boing wrote:
> Pois bem, testei o --backup e o --backup-dir, porém o rsync somente copia
> para o --backup-dir os arquivos que ele *já conhece e foram modificados*.
> Novos arquivos que surgiram não são copiados para o --backup-dir, apenas
> para o destino.

Da manpage rsync(1):

       -b, --backup
              With this option, preexisting destination files are
              renamed as each file is transferred or deleted.  You can
              control where the backup file  goes  and  what  (if any)
              suffix gets appended using the --backup-dir and --suffix
              options.

Ou seja, é exatamente isso que você entendeu.


Backup com rsync se faz com algo do tipo:

rsync -aHAX -v <o que se quer backupear> <local destino do backup>

-- 
  "One disk to rule them all, One disk to find them. One disk to bring
  them all and in the darkness grind them. In the Land of Redmond
  where the shadows lie." -- The Silicon Valley Tarot
  Henrique Holschuh


More information about the masoch-l mailing list