<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
  <head>

    <meta http-equiv="content-type" content="text/html; charset=ISO-8859-1">
  </head>
  <body bgcolor="#ffffff" text="#000000">
    Hi!<br>
    <br>
    I am backing up&nbsp; (using --link-dest, hard links) to a NAS which has
    an 'rsync' daemon running.<br>
    I do not have ssh access to this Storage-device. Part of my script
    needs to delete whole remote<br>
    directory trees. This seems difficult with rsync.<br>
    <br>
    <br>
    A nice trick is to make an empty source directory:<br>
    <br>
    rsync -a --delete /tmp/empty-dir/
    remote-host::Backups/daily.20101030-0155<br>
    <br>
    <br>
    This works perfect. It deletes the contents of destination. However,
    need it to also delete the<br>
    destination directory its-self.<br>
    <br>
    This seems something very easy, but after searching for many hours
    in the manual, FAQ, Web and<br>
    forum did not reveal a solution.<br>
    <br>
    <br>
    Is it possible to have rsync also delete the 'destination-directory'
    ?<br>
    (Or do i need to work from its parent-directory of the destination -
    here the module itsself ?<br>
    Or do something with filters?)<br>
    <br>
    The next also does not work (it deletes all! from the Backups
    module):<br>
    <br>
    rsync -a --exclude='/***' --include='/daily.20101030-0155/' --delete
    /tmp/empty-dir/ remote-host::Backups<br>
    <br>
    <br>
    Any tips? Did anyone ever tried this? :)<br>
    Thanks a lot in advance!<br>
    Robert<br>
    <br>
    <br>
    PS: I also looked into the --prune-empty-dirs option, without
    success though.<br>
    <br>
    <br>
    <div class="moz-signature">
      <table border="0" cellspacing="0" height="25" width="1">
        <tbody>
          <tr>
            <td><br>
            </td>
            <td><br>
            </td>
            <td><br>
            </td>
          </tr>
        </tbody>
      </table>
    </div>
  </body>
</html>