3

I'm trying to set up a backup system using rsnapshot which will copy files from a remote location into a local one. I've got rsnapshot set up, as far as I can see correctly, but when I run rsnapshot configtest it says

'backup  web3:backups/   web3/ - Source directory "web3:backups/ " doesn't exist'

The configuration line I'm using is:

backup  web3:backups/   web3/

It's using an alias in the hosts file. However, I've also tried using the ip address and defining the user name in the command, but neither of these works either (same error). I've also checked and cmd_ssh is enabled and pointing at a valid file.

Does anyone know what might be causing this? It's getting pretty frustrating at this point as I've managed to get most of the backup systems working and I'm sure I've had this working before as well. I've tried it with ssh and rsync, and both seem to view web3:backups as being a valid network location

3

It would be good to test the syntax of the configuration first.

rsnapshot -c /usr/local/etc/rsnapshot.conf configtest

In my case the problem "Source directory ... doesn't exist" was solved by removal of trailing spaces.

|improve this answer|||||
2

While the docs for rsync say it accepts a host:path argument and uses rsh, I couldn't find evidence in the code for that support.

Before issuing the message you're seeing, it does a bunch of tests on the source argument:

To paraphrase:

if ( is_real_local_abs_path($src) )
elsif ( is_ssh_path($src) )
elsif ( is_anon_rsync_path($src) )
elsif ( is_cwrsync_path($src) )
elsif ( is_linux_lvm_path($src) )
else print "Source directory $src doesn't exist"

None of those patterns are your host:path

If you can, use ssh or an rsync daemon on web3.

For others who get this error on a local filesystem, make sure to follow symlinks all the way when confirming the directory is actually there. For example, I was getting this error for /mydir which pointed to /data/mydir, which existed... but was actually unreadable by root because encfs hides user-mounted dirs even from root, without the -o allow_others option.

|improve this answer|||||
0

From the rsnapshot documentation

In addition to full paths on the local filesystem, you can also backup remote systems using rsync over ssh. If you have ssh installed and enabled (via the cmd_ssh parameter), you can specify a path like:

backup root@example.com:/etc/ example.com/

You need to prepend the remote username@ to the string, so if you're logging in as root then your config file would need to be:

backup  root@web3:backups/   web3/

You possibly also need to use an absolute path (eg, /root/backups/ instead of just backups/)

|improve this answer|||||
  • It's been a while since I worked on this, but I'm pretty sure that I tried it with the user name prepended as well as without. Also I've got the connection for web3 set up to use the correct username by default, which ssh reads without any issues – David Morning Jan 7 '15 at 9:03
0

I encountered the same error, however it turned out to be related to extraneous white space.

I had a line break between the first backup statement and the second. Also, a space was present in the backup declaration rather than just tabs.

|improve this answer|||||
0

In my case, two issues:

  • remote server used a custom SSH port, had to make sure it's in ~/.ssh/config
  • rsnapshot seems to refuse accepting relative paths (i.e. that don't start with a slash), e.g. remoteuser@example.com:public_html. seeing you tried web3:backups/, you may have been having the same issue
|improve this answer|||||

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.