Rsync backup - detect new directory and backup only from that directory

Posted by Pracovek on Server Fault See other posts from Server Fault or by Pracovek
Published on 2013-11-13T09:03:19Z Indexed on 2013/11/13 9:59 UTC
Read the original article Hit count: 383

Filed under:
|
|
|

New cpanel daily backup is creating separate directories for daily backup. This creates problem when I try to user rsync to do an offsite backup since I would like to rsync only latest data. E.g. On backup server I have directory "backup" and on server, from which we are pulling backups I get directories 2013-11-07, 2013-11-08 etc in backup directory. If I backup /backup directory on the server it will use allot more space so I would like to backup only latest directory in backup directory, eg 2013-11-08.

Is there a way to detect latest directory in backup directory and pass that directory name to rsync for backup ?

© Server Fault or respective owner

Related posts about linux

Related posts about backup