<div dir="ltr">How would i need to create the sym link and to what?<br></div><div class="gmail_extra"><br><br><div class="gmail_quote">On Thu, Sep 5, 2013 at 7:03 AM, Kevin Korb <span dir="ltr"><<a href="mailto:kmk@sanitarium.net" target="_blank">kmk@sanitarium.net</a>></span> wrote:<br>

<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">-----BEGIN PGP SIGNED MESSAGE-----<br>
Hash: SHA1<br>
<br>
No, it is linking the new target to the previous link-dest<br>
<br>
On 09/05/13 01:02, Jonathan Aquilina wrote:<br>
> Doesnt my script already do that at the very end?<br>
><br>
><br>
> On Thu, Sep 5, 2013 at 7:00 AM, Kevin Korb <<a href="mailto:kmk@sanitarium.net">kmk@sanitarium.net</a><br>
> <mailto:<a href="mailto:kmk@sanitarium.net">kmk@sanitarium.net</a>>> wrote:<br>
><br>
> Ahh, I missed looking at the ln command.  You are supposed to be<br>
> linking the backup you just made to .current.  So,<br>
><br>
> ssh $user@$remotehost ln -sf $remotedir<br>
> /home/aquj001/recievingDir.current<br>
><br>
> On 09/05/13 00:54, Jonathan Aquilina wrote:<br>
>> Hey Kevin<br>
><br>
>> The path works as it is after i recreated the .current directory<br>
>> but im still having the issue of a directory on the remote being<br>
>> created with too many symbolic links in it and no files.<br>
><br>
><br>
>> On Wed, Sep 4, 2013 at 8:27 PM, Kevin Korb <<a href="mailto:kmk@sanitarium.net">kmk@sanitarium.net</a><br>
> <mailto:<a href="mailto:kmk@sanitarium.net">kmk@sanitarium.net</a>><br>
>> <mailto:<a href="mailto:kmk@sanitarium.net">kmk@sanitarium.net</a> <mailto:<a href="mailto:kmk@sanitarium.net">kmk@sanitarium.net</a>>>> wrote:<br>
><br>
>>> linkdest=$(ssh $user@$remotehost /usr/linux/bin/readlink/<br>
>> /home/aquj001/recievingDir.current)<br>
><br>
>> There probably shouldn't be a trailing / on the readlink<br>
>> command.<br>
><br>
>> If that doesn't settle it is the path in the error message the<br>
>> target or the link-dest?<br>
><br>
>> If it is the target try sending a mkdir first.<br>
><br>
>> On 09/04/13 09:56, Jonathan Aquilina wrote:<br>
>>> I have the following script that I am working on<br>
><br>
>>> #!/bin/bash<br>
><br>
>>> date=$(date +%F--%T)<br>
><br>
>>> #ssh parameters user=aquj001 remotehost=qa4app<br>
><br>
>>> localdir=/home/aquj001/INFENG/scripts<br>
>>> remotedir=/home/aquj001/recievingDir.$date<br>
><br>
>>> linkdest=$(ssh $user@$remotehost /usr/linux/bin/readlink/<br>
>>> /home/aquj001/recievingDir.current)<br>
><br>
>>> rsync -a --compress  --link-dest=$linkdest --out-format='%i<br>
>>> %n%L %l %M' --omit-dir-times  "$localdir"<br>
>>> "$user@$remotehost:$remotedir" ssh $user@$remotehost /bin/rm<br>
>>> -f /home/aquj001/recievingDir.current ssh $user@$remotehost ln<br>
>>> -sf $remotedir $linkdest<br>
><br>
>>> now the issue becomes when i run it, I get the following<br>
>>> errors.<br>
><br>
>>> rsync: change_dir#4<br>
>>> "/home/aquj001/recievingDir.2013-09-04--15:53:16" failed: No<br>
>>> such file or directory (2) rsync error: errors selecting<br>
>>> input/output files, dirs (code 3) at main.c(877)<br>
>>> [receiver=3.0.6] rsync: connection unexpectedly closed (9 bytes<br>
>>> received so far) [sender] rsync error: error in rsync protocol<br>
>>> data stream (code 12) at io.c(600) [sender=3.0.6]<br>
><br>
>>> It still creates the directory on the remote machine but its<br>
>>> empty and nothing but sym links. Any ideas as to what th<br>
>>> eissue is would be greatly appreciated.<br>
><br>
>>> This is on an AIX 6.1 system installed from the aix toolbox<br>
>>> package.<br>
><br>
><br>
>>> -- Jonathan Aquilina<br>
><br>
><br>
><br>
>> -- Please use reply-all for most replies to avoid omitting the<br>
>> mailing list. To unsubscribe or change options:<br>
>> <a href="https://lists.samba.org/mailman/listinfo/rsync" target="_blank">https://lists.samba.org/mailman/listinfo/rsync</a> Before posting,<br>
>> read: <a href="http://www.catb.org/~esr/faqs/smart-questions.html" target="_blank">http://www.catb.org/~esr/faqs/smart-questions.html</a><br>
><br>
><br>
><br>
><br>
>> -- Jonathan Aquilina<br>
><br>
><br>
><br>
><br>
><br>
> -- Jonathan Aquilina<br>
<br>
- --<br>
~*-,._.,-*~'`^`'~*-,._.,-*~'`^`'~*-,._.,-*~'`^`'~*-,._.,-*~'`^`'~*-,._.,-*~<br>
        Kevin Korb                      Phone:    (407) 252-6853<br>
        Systems Administrator           Internet:<br>
        FutureQuest, Inc.               Kevin@FutureQuest.net  (work)<br>
        Orlando, Florida                <a href="mailto:kmk@sanitarium.net">kmk@sanitarium.net</a> (personal)<br>
        Web page:                       <a href="http://www.sanitarium.net/" target="_blank">http://www.sanitarium.net/</a><br>
        PGP public key available on web site.<br>
~*-,._.,-*~'`^`'~*-,._.,-*~'`^`'~*-,._.,-*~'`^`'~*-,._.,-*~'`^`'~*-,._.,-*~<br>
-----BEGIN PGP SIGNATURE-----<br>
Version: GnuPG v2.0.20 (GNU/Linux)<br>
Comment: Using GnuPG with Thunderbird - <a href="http://www.enigmail.net/" target="_blank">http://www.enigmail.net/</a><br>
<br>
iEYEARECAAYFAlIoEKQACgkQVKC1jlbQAQdMTwCg8/BmBGHwEM5VzpZhQOaxs33S<br>
b+0AoJYaGb5poaDdEx+FSxM2kYGZiYhj<br>
=DdM8<br>
-----END PGP SIGNATURE-----<br>
</blockquote></div><br><br clear="all"><br>-- <br>Jonathan Aquilina
</div>