diff options
author | Tiago Gomes <tiago.gomes@codethink.co.uk> | 2013-06-16 11:41:32 +0000 |
---|---|---|
committer | Tiago Gomes <tiago.gomes@codethink.co.uk> | 2013-06-17 01:36:32 +0000 |
commit | d8a87880248ec754affc302fa8966bf5ebd83046 (patch) | |
tree | b8f57de09956506966ecb822e10d298084fd0160 | |
parent | 89ad5f816fff7bd7897b2d4cb02ae5cc6b6799d2 (diff) | |
download | definitions-d8a87880248ec754affc302fa8966bf5ebd83046.tar.gz |
Add a missing trailing slash to the source directory of rsync
Accordingly the rsync manual:
"A trailing slash on the source changes this behavior to avoid
creating an additional directory level at the destination. You can
think of a trailing / on a source as meaning "copy the contents of
this directory" as opposed to "copy the directory by name".
-rwxr-xr-x | ssh-rsync.write | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/ssh-rsync.write b/ssh-rsync.write index 77266d33..b8d30e22 100755 --- a/ssh-rsync.write +++ b/ssh-rsync.write @@ -142,7 +142,8 @@ class SshRsyncWriteExtension(morphlib.writeexts.WriteExtension): old_orig, new_orig]) cliapp.runcmd(['rsync', '-as', '--checksum', '--numeric-ids', - '--delete', temp_root, '%s:%s' % (location, new_orig)]) + '--delete', temp_root + os.path.sep, + '%s:%s' % (location, new_orig)]) def get_old_orig(self, location, remote_mnt): '''Identify which subvolume to snapshot from''' |