-
Notifications
You must be signed in to change notification settings - Fork 33
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Initial target directory missing with SSH backend #54
Comments
From a first look this sounds like a rsync issue. Depending on what exactly the target directory represents, I would expect this directory being created either as part of the rsync daemon file module setup or by rsync itself when synchronizing the files. Can you share more information which directory fails to be created? Assuming you have a rsync daemon config like ...
and a rsync config like: I presume that rsync failed to create the |
hi, I have the same problem. Rsync does not create the required folder. So I have to create is manual, before the first run. We use a Synology as Rsync SSH backend. cu denny |
Ok, thanks for the feedback. Can you perhaps clarify which folder is not created? Given rsync is able to create intermediary directories I somewhat have trouble understand why it fails on the first one ... |
hi, we use Synology as backend for Rsync over SSH. So the path is: /volume1/Backup_Linux/ The folder |
Since this is a transport related problem, I don't know if this is in scope of this puppet module. We simply fixed this in our Puppet setup by adding a small #!/bin/bash
# Create the target directory on rsync server, when using rsync modules
if echo $TARGET_URL_PROT | grep -q '^rsync://'; then
# Must use different parameter for rsync server vs. rsync via ssh
if echo $TARGET_URL_HOSTPATH | grep -q '::'; then
DESTINATION=${TARGET_URL_USER}@${TARGET_URL_HOSTPATH}
else
DESTINATION=${TARGET_URL_PROT}${TARGET_URL_USER}@${TARGET_URL_HOSTPATH}
fi
# Set password for rsync if present
[ ! -z $TARGET_URL_PASS ] && export RSYNC_PASSWORD=$TARGET_URL_PASS
# Create an empty directory as source
EMPTY_DIR=`/bin/mktemp -d`
# Ensure it is there
/usr/bin/rsync -avz --no-p --no-g --no-o $EMPTY_DIR/ $DESTINATION >/dev/null 2>&1
/bin/rmdir $EMPTY_DIR
fi It simply |
My initial attempt to do a backup failed with lots of timed out errors because the target directory was missing. Is it really required to precreate the target directory when using rsync:// protocol? Not sure if this is a limitation in duplicty or duply or if this module should just make sure the target directory exists.
I worked around this by adding pre script hook to use sftp to create the target directory.
The text was updated successfully, but these errors were encountered: