Re: issues syncing between one host and another
On Thu 05 Sep 2013 18:02:16 NZST +1200, Kevin Korb wrote: I am pretty sure I mentioned this when we were talking in IRC but I feel I need to point out again that this is what rsnapshot does. The OP wanted to rsync local directories to a remote backup host. The biggest (IMHO) drawback of rsnapshot is that it can't do precisely that. It can rsync from remote to local, but for obvious reasons I don't want to give the backup host root access to the host. Or is there a trick to rsnapshot to store the snapshots on remote? Thanks, Volker -- Volker Kuhlmann http://volker.dnsalias.net/ Please do not CC list postings to me. -- Please use reply-all for most replies to avoid omitting the mailing list. To unsubscribe or change options: https://lists.samba.org/mailman/listinfo/rsync Before posting, read: http://www.catb.org/~esr/faqs/smart-questions.html
Re: issues syncing between one host and another
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Yes, I know that the OP was asking about pushing backups and rsnapshot only pulls backups. The point was that the OP just wasn't getting the - --link-dest concept at all. Therefore a DIY solution just wasn't going to heppen. Therefore trying something like rsnapshot would either be a good enough solution or it would be a working example that would demonstrate the concept. On 09/08/13 17:57, Volker Kuhlmann wrote: On Thu 05 Sep 2013 18:02:16 NZST +1200, Kevin Korb wrote: I am pretty sure I mentioned this when we were talking in IRC but I feel I need to point out again that this is what rsnapshot does. The OP wanted to rsync local directories to a remote backup host. The biggest (IMHO) drawback of rsnapshot is that it can't do precisely that. It can rsync from remote to local, but for obvious reasons I don't want to give the backup host root access to the host. Or is there a trick to rsnapshot to store the snapshots on remote? Thanks, Volker - -- ~*-,._.,-*~'`^`'~*-,._.,-*~'`^`'~*-,._.,-*~'`^`'~*-,._.,-*~'`^`'~*-,._.,-*~ Kevin Korb Phone:(407) 252-6853 Systems Administrator Internet: FutureQuest, Inc. ke...@futurequest.net (work) Orlando, Floridak...@sanitarium.net (personal) Web page: http://www.sanitarium.net/ PGP public key available on web site. ~*-,._.,-*~'`^`'~*-,._.,-*~'`^`'~*-,._.,-*~'`^`'~*-,._.,-*~'`^`'~*-,._.,-*~ -BEGIN PGP SIGNATURE- Version: GnuPG v2.0.20 (GNU/Linux) Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/ iEYEARECAAYFAlIs88IACgkQVKC1jlbQAQecEACfZOgGuRXcryUvmK/WZ857TFCm ebMAoKQZp6rsenANLJ0BsxXn7fzVKRPf =+f2P -END PGP SIGNATURE- -- Please use reply-all for most replies to avoid omitting the mailing list. To unsubscribe or change options: https://lists.samba.org/mailman/listinfo/rsync Before posting, read: http://www.catb.org/~esr/faqs/smart-questions.html
Re: issues syncing between one host and another
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 I am pretty sure I mentioned this when we were talking in IRC but I feel I need to point out again that this is what rsnapshot does. You don't have to do this all yourself if you don't really want to. The simple fact is that you are still stuck at the proof of concept level. You haven't even considered error handling yet. On 09/05/13 01:57, Kevin Korb wrote: First you rm the existing current link then you create a new one pointing at the backup you just made. It really is just a reference to use in the script to determine what the most recent backup is. The alternative would be to parse a directory listing to determine what the --link-dest parameter should be. On 09/05/13 01:55, Jonathan Aquilina wrote: So each subsequent sync links the new directory to the current one unless there is only one directory? On Thu, Sep 5, 2013 at 7:54 AM, Kevin Korb k...@sanitarium.net mailto:k...@sanitarium.net wrote: There is only one current one. The oldest one can't be the one that the current symlink is pointing to unless there is only 1 backup. On 09/05/13 01:52, Jonathan Aquilina wrote: What will happen if the first directory which is the oldest gets deleted wouldnt i have to re link the next directory with the .current one? On Thu, Sep 5, 2013 at 7:39 AM, Kevin Korb k...@sanitarium.net mailto:k...@sanitarium.net mailto:k...@sanitarium.net mailto:k...@sanitarium.net wrote: Yes. On 09/05/13 01:38, Jonathan Aquilina wrote: The current pointer being the recieveDir.current correct? On Thu, Sep 5, 2013 at 7:37 AM, Kevin Korb k...@sanitarium.net mailto:k...@sanitarium.net mailto:k...@sanitarium.net mailto:k...@sanitarium.net mailto:k...@sanitarium.net mailto:k...@sanitarium.net mailto:k...@sanitarium.net mailto:k...@sanitarium.net wrote: The backup you just made to the current pointer you will readlink on the next run. On 09/05/13 01:36, Jonathan Aquilina wrote: Understood, What do i need to sym link together? On Thu, Sep 5, 2013 at 7:34 AM, Kevin Korb k...@sanitarium.net mailto:k...@sanitarium.net mailto:k...@sanitarium.net mailto:k...@sanitarium.net mailto:k...@sanitarium.net mailto:k...@sanitarium.net mailto:k...@sanitarium.net mailto:k...@sanitarium.net mailto:k...@sanitarium.net mailto:k...@sanitarium.net mailto:k...@sanitarium.net mailto:k...@sanitarium.net mailto:k...@sanitarium.net mailto:k...@sanitarium.net mailto:k...@sanitarium.net mailto:k...@sanitarium.net wrote: The symlink is only a pointer so that you can readlink it on the next run to determine what to use as your --link-dest parameter. It is simply a pointer to the latest directory. Deleting old stuff is a different concept. You have a list of directories with dates and times in the names. A simple ls will list them in order. Any scripting language will have the ability to sort a list of file names. So, you make a sorted list then delete however many you have that are more than the number of them you want starting with the oldest. The current symlink is only pointing to the newest so it would only matter in the deletions if you are deleting all of the backups. On 09/05/13 01:08, Jonathan Aquilina wrote: So if i basically sym link the empty backup with the sym link loop to the current directory it should fix the issue? what would happen though if i want to remove the oldest directory which was synced after 7 days would i have issues then like i am experiencing now? On Thu, Sep 5, 2013 at 7:06 AM, Kevin Korb k...@sanitarium.net mailto:k...@sanitarium.net mailto:k...@sanitarium.net mailto:k...@sanitarium.net mailto:k...@sanitarium.net mailto:k...@sanitarium.net mailto:k...@sanitarium.net mailto:k...@sanitarium.net mailto:k...@sanitarium.net mailto:k...@sanitarium.net mailto:k...@sanitarium.net mailto:k...@sanitarium.net mailto:k...@sanitarium.net mailto:k...@sanitarium.net mailto:k...@sanitarium.net mailto:k...@sanitarium.net mailto:k...@sanitarium.net mailto:k...@sanitarium.net mailto:k...@sanitarium.net mailto:k...@sanitarium.net mailto:k...@sanitarium.net mailto:k...@sanitarium.net mailto:k...@sanitarium.net mailto:k...@sanitarium.net mailto:k...@sanitarium.net mailto:k...@sanitarium.net mailto:k...@sanitarium.net mailto:k...@sanitarium.net mailto:k...@sanitarium.net mailto:k...@sanitarium.net mailto:k...@sanitarium.net mailto:k...@sanitarium.net wrote: The .current symlink is a pointer to the current backup. It should always be from the backup you just made to the fixed location of the path you are using readlink on. On 09/05/13 01:04, Jonathan Aquilina wrote: How would i need to create the sym link and to what? On Thu, Sep 5, 2013 at 7:03 AM, Kevin Korb k...@sanitarium.net mailto:k...@sanitarium.net mailto:k...@sanitarium.net mailto:k...@sanitarium.net mailto:k...@sanitarium.net mailto:k...@sanitarium.net mailto:k...@sanitarium.net
Re: issues syncing between one host and another
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Either you are completely not getting the concept or your OS is not capable of this functionality. I haven't touched AIX since 1995 so I can't really say which. So, again, I am suggesting you try rsnapshot. Either it will fail and prove that AIX can't do this or it will give you a functioning example of this backup concept to look at and decide if you want to do it differently. On 09/05/13 17:44, Jonathan Aquilina wrote: After sym linking I am still having no luck rsync: change_dir#4 /home/aquj001/recievingDir.2013-09-05--23:40:58 failed: No such file or directory (2) rsync error: errors selecting input/output files, dirs (code 3) at main.c(877) [receiver=3.0.6] rsync: connection unexpectedly closed (9 bytes received so far) [sender] rsync error: error in rsync protocol data stream (code 12) at io.c(600) [sender=3.0.6] I am still getting these errors. On Thu, Sep 5, 2013 at 7:57 AM, Kevin Korb k...@sanitarium.net mailto:k...@sanitarium.net wrote: -BEGIN PGP SIGNED MESSAGE- Hash: SHA1 First you rm the existing current link then you create a new one pointing at the backup you just made. It really is just a reference to use in the script to determine what the most recent backup is. The alternative would be to parse a directory listing to determine what the --link-dest parameter should be. - -- ~*-,._.,-*~'`^`'~*-,._.,-*~'`^`'~*-,._.,-*~'`^`'~*-,._.,-*~'`^`'~*-,._.,-*~ Kevin Korb Phone:(407) 252-6853 Systems Administrator Internet: FutureQuest, Inc. ke...@futurequest.net (work) Orlando, Floridak...@sanitarium.net (personal) Web page: http://www.sanitarium.net/ PGP public key available on web site. ~*-,._.,-*~'`^`'~*-,._.,-*~'`^`'~*-,._.,-*~'`^`'~*-,._.,-*~'`^`'~*-,._.,-*~ -BEGIN PGP SIGNATURE- Version: GnuPG v2.0.20 (GNU/Linux) Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/ iEYEARECAAYFAlIpAxMACgkQVKC1jlbQAQcewgCgulcebzhLNM2TYJtszIi/TOBn p7oAn12QS1BmY2VTdl4qlKzttDDtXOgu =sImI -END PGP SIGNATURE- -- Please use reply-all for most replies to avoid omitting the mailing list. To unsubscribe or change options: https://lists.samba.org/mailman/listinfo/rsync Before posting, read: http://www.catb.org/~esr/faqs/smart-questions.html
Re: issues syncing between one host and another
readlink works on aix through the ibm toolkit package of coreutils. I will reevaluate the script tomorrow as its late here at work and im not functioning at 100% capacity. On Fri, Sep 6, 2013 at 12:17 AM, Kevin Korb k...@sanitarium.net wrote: -BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Either you are completely not getting the concept or your OS is not capable of this functionality. I haven't touched AIX since 1995 so I can't really say which. So, again, I am suggesting you try rsnapshot. Either it will fail and prove that AIX can't do this or it will give you a functioning example of this backup concept to look at and decide if you want to do it differently. On 09/05/13 17:44, Jonathan Aquilina wrote: After sym linking I am still having no luck rsync: change_dir#4 /home/aquj001/recievingDir.2013-09-05--23:40:58 failed: No such file or directory (2) rsync error: errors selecting input/output files, dirs (code 3) at main.c(877) [receiver=3.0.6] rsync: connection unexpectedly closed (9 bytes received so far) [sender] rsync error: error in rsync protocol data stream (code 12) at io.c(600) [sender=3.0.6] I am still getting these errors. On Thu, Sep 5, 2013 at 7:57 AM, Kevin Korb k...@sanitarium.net mailto:k...@sanitarium.net wrote: -BEGIN PGP SIGNED MESSAGE- Hash: SHA1 First you rm the existing current link then you create a new one pointing at the backup you just made. It really is just a reference to use in the script to determine what the most recent backup is. The alternative would be to parse a directory listing to determine what the --link-dest parameter should be. - -- ~*-,._.,-*~'`^`'~*-,._.,-*~'`^`'~*-,._.,-*~'`^`'~*-,._.,-*~'`^`'~*-,._.,-*~ Kevin Korb Phone:(407) 252-6853 Systems Administrator Internet: FutureQuest, Inc. ke...@futurequest.net (work) Orlando, Floridak...@sanitarium.net (personal) Web page: http://www.sanitarium.net/ PGP public key available on web site. ~*-,._.,-*~'`^`'~*-,._.,-*~'`^`'~*-,._.,-*~'`^`'~*-,._.,-*~'`^`'~*-,._.,-*~ -BEGIN PGP SIGNATURE- Version: GnuPG v2.0.20 (GNU/Linux) Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/ iEYEARECAAYFAlIpAxMACgkQVKC1jlbQAQcewgCgulcebzhLNM2TYJtszIi/TOBn p7oAn12QS1BmY2VTdl4qlKzttDDtXOgu =sImI -END PGP SIGNATURE- -- Jonathan Aquilina -- Please use reply-all for most replies to avoid omitting the mailing list. To unsubscribe or change options: https://lists.samba.org/mailman/listinfo/rsync Before posting, read: http://www.catb.org/~esr/faqs/smart-questions.html
Re: issues syncing between one host and another
After sym linking I am still having no luck rsync: change_dir#4 /home/aquj001/recievingDir.2013-09-05--23:40:58 failed: No such file or directory (2) rsync error: errors selecting input/output files, dirs (code 3) at main.c(877) [receiver=3.0.6] rsync: connection unexpectedly closed (9 bytes received so far) [sender] rsync error: error in rsync protocol data stream (code 12) at io.c(600) [sender=3.0.6] I am still getting these errors. On Thu, Sep 5, 2013 at 7:57 AM, Kevin Korb k...@sanitarium.net wrote: -BEGIN PGP SIGNED MESSAGE- Hash: SHA1 First you rm the existing current link then you create a new one pointing at the backup you just made. It really is just a reference to use in the script to determine what the most recent backup is. The alternative would be to parse a directory listing to determine what the --link-dest parameter should be. -- Please use reply-all for most replies to avoid omitting the mailing list. To unsubscribe or change options: https://lists.samba.org/mailman/listinfo/rsync Before posting, read: http://www.catb.org/~esr/faqs/smart-questions.html
issues syncing between one host and another
I have the following script that I am working on #!/bin/bash date=$(date +%F--%T) #ssh parameters user=aquj001 remotehost=qa4app localdir=/home/aquj001/INFENG/scripts remotedir=/home/aquj001/recievingDir.$date linkdest=$(ssh $user@$remotehost /usr/linux/bin/readlink/ /home/aquj001/recievingDir.current) rsync -a --compress --link-dest=$linkdest --out-format='%i %n%L %l %M' --omit-dir-times $localdir $user@$remotehost:$remotedir ssh $user@$remotehost /bin/rm -f /home/aquj001/recievingDir.current ssh $user@$remotehost ln -sf $remotedir $linkdest now the issue becomes when i run it, I get the following errors. rsync: change_dir#4 /home/aquj001/recievingDir.2013-09-04--15:53:16 failed: No such file or directory (2) rsync error: errors selecting input/output files, dirs (code 3) at main.c(877) [receiver=3.0.6] rsync: connection unexpectedly closed (9 bytes received so far) [sender] rsync error: error in rsync protocol data stream (code 12) at io.c(600) [sender=3.0.6] It still creates the directory on the remote machine but its empty and nothing but sym links. Any ideas as to what th eissue is would be greatly appreciated. This is on an AIX 6.1 system installed from the aix toolbox package. -- Jonathan Aquilina -- Please use reply-all for most replies to avoid omitting the mailing list. To unsubscribe or change options: https://lists.samba.org/mailman/listinfo/rsync Before posting, read: http://www.catb.org/~esr/faqs/smart-questions.html
Re: issues syncing between one host and another
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 linkdest=$(ssh $user@$remotehost /usr/linux/bin/readlink/ /home/aquj001/recievingDir.current) There probably shouldn't be a trailing / on the readlink command. If that doesn't settle it is the path in the error message the target or the link-dest? If it is the target try sending a mkdir first. On 09/04/13 09:56, Jonathan Aquilina wrote: I have the following script that I am working on #!/bin/bash date=$(date +%F--%T) #ssh parameters user=aquj001 remotehost=qa4app localdir=/home/aquj001/INFENG/scripts remotedir=/home/aquj001/recievingDir.$date linkdest=$(ssh $user@$remotehost /usr/linux/bin/readlink/ /home/aquj001/recievingDir.current) rsync -a --compress --link-dest=$linkdest --out-format='%i %n%L %l %M' --omit-dir-times $localdir $user@$remotehost:$remotedir ssh $user@$remotehost /bin/rm -f /home/aquj001/recievingDir.current ssh $user@$remotehost ln -sf $remotedir $linkdest now the issue becomes when i run it, I get the following errors. rsync: change_dir#4 /home/aquj001/recievingDir.2013-09-04--15:53:16 failed: No such file or directory (2) rsync error: errors selecting input/output files, dirs (code 3) at main.c(877) [receiver=3.0.6] rsync: connection unexpectedly closed (9 bytes received so far) [sender] rsync error: error in rsync protocol data stream (code 12) at io.c(600) [sender=3.0.6] It still creates the directory on the remote machine but its empty and nothing but sym links. Any ideas as to what th eissue is would be greatly appreciated. This is on an AIX 6.1 system installed from the aix toolbox package. -- Jonathan Aquilina - -- ~*-,._.,-*~'`^`'~*-,._.,-*~'`^`'~*-,._.,-*~'`^`'~*-,._.,-*~'`^`'~*-,._.,-*~ Kevin Korb Phone:(407) 252-6853 Systems Administrator Internet: FutureQuest, Inc. ke...@futurequest.net (work) Orlando, Floridak...@sanitarium.net (personal) Web page: http://www.sanitarium.net/ PGP public key available on web site. ~*-,._.,-*~'`^`'~*-,._.,-*~'`^`'~*-,._.,-*~'`^`'~*-,._.,-*~'`^`'~*-,._.,-*~ -BEGIN PGP SIGNATURE- Version: GnuPG v2.0.20 (GNU/Linux) Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/ iEYEARECAAYFAlIne4cACgkQVKC1jlbQAQed9gCg4KlTQELztwUE3UBbGv8mZ993 r0EAnRO/fsN7wgulW4S/kRKdvdCdWchH =VNAw -END PGP SIGNATURE- -- Please use reply-all for most replies to avoid omitting the mailing list. To unsubscribe or change options: https://lists.samba.org/mailman/listinfo/rsync Before posting, read: http://www.catb.org/~esr/faqs/smart-questions.html
Re: issues syncing between one host and another
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Ahh, I missed looking at the ln command. You are supposed to be linking the backup you just made to .current. So, ssh $user@$remotehost ln -sf $remotedir /home/aquj001/recievingDir.current On 09/05/13 00:54, Jonathan Aquilina wrote: Hey Kevin The path works as it is after i recreated the .current directory but im still having the issue of a directory on the remote being created with too many symbolic links in it and no files. On Wed, Sep 4, 2013 at 8:27 PM, Kevin Korb k...@sanitarium.net mailto:k...@sanitarium.net wrote: linkdest=$(ssh $user@$remotehost /usr/linux/bin/readlink/ /home/aquj001/recievingDir.current) There probably shouldn't be a trailing / on the readlink command. If that doesn't settle it is the path in the error message the target or the link-dest? If it is the target try sending a mkdir first. On 09/04/13 09:56, Jonathan Aquilina wrote: I have the following script that I am working on #!/bin/bash date=$(date +%F--%T) #ssh parameters user=aquj001 remotehost=qa4app localdir=/home/aquj001/INFENG/scripts remotedir=/home/aquj001/recievingDir.$date linkdest=$(ssh $user@$remotehost /usr/linux/bin/readlink/ /home/aquj001/recievingDir.current) rsync -a --compress --link-dest=$linkdest --out-format='%i %n%L %l %M' --omit-dir-times $localdir $user@$remotehost:$remotedir ssh $user@$remotehost /bin/rm -f /home/aquj001/recievingDir.current ssh $user@$remotehost ln -sf $remotedir $linkdest now the issue becomes when i run it, I get the following errors. rsync: change_dir#4 /home/aquj001/recievingDir.2013-09-04--15:53:16 failed: No such file or directory (2) rsync error: errors selecting input/output files, dirs (code 3) at main.c(877) [receiver=3.0.6] rsync: connection unexpectedly closed (9 bytes received so far) [sender] rsync error: error in rsync protocol data stream (code 12) at io.c(600) [sender=3.0.6] It still creates the directory on the remote machine but its empty and nothing but sym links. Any ideas as to what th eissue is would be greatly appreciated. This is on an AIX 6.1 system installed from the aix toolbox package. -- Jonathan Aquilina -- Please use reply-all for most replies to avoid omitting the mailing list. To unsubscribe or change options: https://lists.samba.org/mailman/listinfo/rsync Before posting, read: http://www.catb.org/~esr/faqs/smart-questions.html -- Jonathan Aquilina - -- ~*-,._.,-*~'`^`'~*-,._.,-*~'`^`'~*-,._.,-*~'`^`'~*-,._.,-*~'`^`'~*-,._.,-*~ Kevin Korb Phone:(407) 252-6853 Systems Administrator Internet: FutureQuest, Inc. ke...@futurequest.net (work) Orlando, Floridak...@sanitarium.net (personal) Web page: http://www.sanitarium.net/ PGP public key available on web site. ~*-,._.,-*~'`^`'~*-,._.,-*~'`^`'~*-,._.,-*~'`^`'~*-,._.,-*~'`^`'~*-,._.,-*~ -BEGIN PGP SIGNATURE- Version: GnuPG v2.0.20 (GNU/Linux) Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/ iEYEARECAAYFAlIoD/gACgkQVKC1jlbQAQdpnwCfeh0QQ5pa/ixtETZ+2VGTJycF fF4AoO39qJay1Wp172xOkrGlGPswB9sf =5aV6 -END PGP SIGNATURE- -- Please use reply-all for most replies to avoid omitting the mailing list. To unsubscribe or change options: https://lists.samba.org/mailman/listinfo/rsync Before posting, read: http://www.catb.org/~esr/faqs/smart-questions.html
Re: issues syncing between one host and another
Doesnt my script already do that at the very end? On Thu, Sep 5, 2013 at 7:00 AM, Kevin Korb k...@sanitarium.net wrote: -BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Ahh, I missed looking at the ln command. You are supposed to be linking the backup you just made to .current. So, ssh $user@$remotehost ln -sf $remotedir /home/aquj001/recievingDir.current On 09/05/13 00:54, Jonathan Aquilina wrote: Hey Kevin The path works as it is after i recreated the .current directory but im still having the issue of a directory on the remote being created with too many symbolic links in it and no files. On Wed, Sep 4, 2013 at 8:27 PM, Kevin Korb k...@sanitarium.net mailto:k...@sanitarium.net wrote: linkdest=$(ssh $user@$remotehost /usr/linux/bin/readlink/ /home/aquj001/recievingDir.current) There probably shouldn't be a trailing / on the readlink command. If that doesn't settle it is the path in the error message the target or the link-dest? If it is the target try sending a mkdir first. On 09/04/13 09:56, Jonathan Aquilina wrote: I have the following script that I am working on #!/bin/bash date=$(date +%F--%T) #ssh parameters user=aquj001 remotehost=qa4app localdir=/home/aquj001/INFENG/scripts remotedir=/home/aquj001/recievingDir.$date linkdest=$(ssh $user@$remotehost /usr/linux/bin/readlink/ /home/aquj001/recievingDir.current) rsync -a --compress --link-dest=$linkdest --out-format='%i %n%L %l %M' --omit-dir-times $localdir $user@$remotehost:$remotedir ssh $user@$remotehost /bin/rm -f /home/aquj001/recievingDir.current ssh $user@$remotehost ln -sf $remotedir $linkdest now the issue becomes when i run it, I get the following errors. rsync: change_dir#4 /home/aquj001/recievingDir.2013-09-04--15:53:16 failed: No such file or directory (2) rsync error: errors selecting input/output files, dirs (code 3) at main.c(877) [receiver=3.0.6] rsync: connection unexpectedly closed (9 bytes received so far) [sender] rsync error: error in rsync protocol data stream (code 12) at io.c(600) [sender=3.0.6] It still creates the directory on the remote machine but its empty and nothing but sym links. Any ideas as to what th eissue is would be greatly appreciated. This is on an AIX 6.1 system installed from the aix toolbox package. -- Jonathan Aquilina -- Please use reply-all for most replies to avoid omitting the mailing list. To unsubscribe or change options: https://lists.samba.org/mailman/listinfo/rsync Before posting, read: http://www.catb.org/~esr/faqs/smart-questions.html -- Jonathan Aquilina - -- ~*-,._.,-*~'`^`'~*-,._.,-*~'`^`'~*-,._.,-*~'`^`'~*-,._.,-*~'`^`'~*-,._.,-*~ Kevin Korb Phone:(407) 252-6853 Systems Administrator Internet: FutureQuest, Inc. ke...@futurequest.net (work) Orlando, Floridak...@sanitarium.net (personal) Web page: http://www.sanitarium.net/ PGP public key available on web site. ~*-,._.,-*~'`^`'~*-,._.,-*~'`^`'~*-,._.,-*~'`^`'~*-,._.,-*~'`^`'~*-,._.,-*~ -BEGIN PGP SIGNATURE- Version: GnuPG v2.0.20 (GNU/Linux) Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/ iEYEARECAAYFAlIoD/gACgkQVKC1jlbQAQdpnwCfeh0QQ5pa/ixtETZ+2VGTJycF fF4AoO39qJay1Wp172xOkrGlGPswB9sf =5aV6 -END PGP SIGNATURE- -- Jonathan Aquilina -- Please use reply-all for most replies to avoid omitting the mailing list. To unsubscribe or change options: https://lists.samba.org/mailman/listinfo/rsync Before posting, read: http://www.catb.org/~esr/faqs/smart-questions.html
Re: issues syncing between one host and another
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 No, it is linking the new target to the previous link-dest On 09/05/13 01:02, Jonathan Aquilina wrote: Doesnt my script already do that at the very end? On Thu, Sep 5, 2013 at 7:00 AM, Kevin Korb k...@sanitarium.net mailto:k...@sanitarium.net wrote: Ahh, I missed looking at the ln command. You are supposed to be linking the backup you just made to .current. So, ssh $user@$remotehost ln -sf $remotedir /home/aquj001/recievingDir.current On 09/05/13 00:54, Jonathan Aquilina wrote: Hey Kevin The path works as it is after i recreated the .current directory but im still having the issue of a directory on the remote being created with too many symbolic links in it and no files. On Wed, Sep 4, 2013 at 8:27 PM, Kevin Korb k...@sanitarium.net mailto:k...@sanitarium.net mailto:k...@sanitarium.net mailto:k...@sanitarium.net wrote: linkdest=$(ssh $user@$remotehost /usr/linux/bin/readlink/ /home/aquj001/recievingDir.current) There probably shouldn't be a trailing / on the readlink command. If that doesn't settle it is the path in the error message the target or the link-dest? If it is the target try sending a mkdir first. On 09/04/13 09:56, Jonathan Aquilina wrote: I have the following script that I am working on #!/bin/bash date=$(date +%F--%T) #ssh parameters user=aquj001 remotehost=qa4app localdir=/home/aquj001/INFENG/scripts remotedir=/home/aquj001/recievingDir.$date linkdest=$(ssh $user@$remotehost /usr/linux/bin/readlink/ /home/aquj001/recievingDir.current) rsync -a --compress --link-dest=$linkdest --out-format='%i %n%L %l %M' --omit-dir-times $localdir $user@$remotehost:$remotedir ssh $user@$remotehost /bin/rm -f /home/aquj001/recievingDir.current ssh $user@$remotehost ln -sf $remotedir $linkdest now the issue becomes when i run it, I get the following errors. rsync: change_dir#4 /home/aquj001/recievingDir.2013-09-04--15:53:16 failed: No such file or directory (2) rsync error: errors selecting input/output files, dirs (code 3) at main.c(877) [receiver=3.0.6] rsync: connection unexpectedly closed (9 bytes received so far) [sender] rsync error: error in rsync protocol data stream (code 12) at io.c(600) [sender=3.0.6] It still creates the directory on the remote machine but its empty and nothing but sym links. Any ideas as to what th eissue is would be greatly appreciated. This is on an AIX 6.1 system installed from the aix toolbox package. -- Jonathan Aquilina -- Please use reply-all for most replies to avoid omitting the mailing list. To unsubscribe or change options: https://lists.samba.org/mailman/listinfo/rsync Before posting, read: http://www.catb.org/~esr/faqs/smart-questions.html -- Jonathan Aquilina -- Jonathan Aquilina - -- ~*-,._.,-*~'`^`'~*-,._.,-*~'`^`'~*-,._.,-*~'`^`'~*-,._.,-*~'`^`'~*-,._.,-*~ Kevin Korb Phone:(407) 252-6853 Systems Administrator Internet: FutureQuest, Inc. ke...@futurequest.net (work) Orlando, Floridak...@sanitarium.net (personal) Web page: http://www.sanitarium.net/ PGP public key available on web site. ~*-,._.,-*~'`^`'~*-,._.,-*~'`^`'~*-,._.,-*~'`^`'~*-,._.,-*~'`^`'~*-,._.,-*~ -BEGIN PGP SIGNATURE- Version: GnuPG v2.0.20 (GNU/Linux) Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/ iEYEARECAAYFAlIoEKQACgkQVKC1jlbQAQdMTwCg8/BmBGHwEM5VzpZhQOaxs33S b+0AoJYaGb5poaDdEx+FSxM2kYGZiYhj =DdM8 -END PGP SIGNATURE- -- Please use reply-all for most replies to avoid omitting the mailing list. To unsubscribe or change options: https://lists.samba.org/mailman/listinfo/rsync Before posting, read: http://www.catb.org/~esr/faqs/smart-questions.html
Re: issues syncing between one host and another
How would i need to create the sym link and to what? On Thu, Sep 5, 2013 at 7:03 AM, Kevin Korb k...@sanitarium.net wrote: -BEGIN PGP SIGNED MESSAGE- Hash: SHA1 No, it is linking the new target to the previous link-dest On 09/05/13 01:02, Jonathan Aquilina wrote: Doesnt my script already do that at the very end? On Thu, Sep 5, 2013 at 7:00 AM, Kevin Korb k...@sanitarium.net mailto:k...@sanitarium.net wrote: Ahh, I missed looking at the ln command. You are supposed to be linking the backup you just made to .current. So, ssh $user@$remotehost ln -sf $remotedir /home/aquj001/recievingDir.current On 09/05/13 00:54, Jonathan Aquilina wrote: Hey Kevin The path works as it is after i recreated the .current directory but im still having the issue of a directory on the remote being created with too many symbolic links in it and no files. On Wed, Sep 4, 2013 at 8:27 PM, Kevin Korb k...@sanitarium.net mailto:k...@sanitarium.net mailto:k...@sanitarium.net mailto:k...@sanitarium.net wrote: linkdest=$(ssh $user@$remotehost /usr/linux/bin/readlink/ /home/aquj001/recievingDir.current) There probably shouldn't be a trailing / on the readlink command. If that doesn't settle it is the path in the error message the target or the link-dest? If it is the target try sending a mkdir first. On 09/04/13 09:56, Jonathan Aquilina wrote: I have the following script that I am working on #!/bin/bash date=$(date +%F--%T) #ssh parameters user=aquj001 remotehost=qa4app localdir=/home/aquj001/INFENG/scripts remotedir=/home/aquj001/recievingDir.$date linkdest=$(ssh $user@$remotehost /usr/linux/bin/readlink/ /home/aquj001/recievingDir.current) rsync -a --compress --link-dest=$linkdest --out-format='%i %n%L %l %M' --omit-dir-times $localdir $user@$remotehost:$remotedir ssh $user@$remotehost /bin/rm -f /home/aquj001/recievingDir.current ssh $user@$remotehost ln -sf $remotedir $linkdest now the issue becomes when i run it, I get the following errors. rsync: change_dir#4 /home/aquj001/recievingDir.2013-09-04--15:53:16 failed: No such file or directory (2) rsync error: errors selecting input/output files, dirs (code 3) at main.c(877) [receiver=3.0.6] rsync: connection unexpectedly closed (9 bytes received so far) [sender] rsync error: error in rsync protocol data stream (code 12) at io.c(600) [sender=3.0.6] It still creates the directory on the remote machine but its empty and nothing but sym links. Any ideas as to what th eissue is would be greatly appreciated. This is on an AIX 6.1 system installed from the aix toolbox package. -- Jonathan Aquilina -- Please use reply-all for most replies to avoid omitting the mailing list. To unsubscribe or change options: https://lists.samba.org/mailman/listinfo/rsync Before posting, read: http://www.catb.org/~esr/faqs/smart-questions.html -- Jonathan Aquilina -- Jonathan Aquilina - -- ~*-,._.,-*~'`^`'~*-,._.,-*~'`^`'~*-,._.,-*~'`^`'~*-,._.,-*~'`^`'~*-,._.,-*~ Kevin Korb Phone:(407) 252-6853 Systems Administrator Internet: FutureQuest, Inc. ke...@futurequest.net (work) Orlando, Floridak...@sanitarium.net (personal) Web page: http://www.sanitarium.net/ PGP public key available on web site. ~*-,._.,-*~'`^`'~*-,._.,-*~'`^`'~*-,._.,-*~'`^`'~*-,._.,-*~'`^`'~*-,._.,-*~ -BEGIN PGP SIGNATURE- Version: GnuPG v2.0.20 (GNU/Linux) Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/ iEYEARECAAYFAlIoEKQACgkQVKC1jlbQAQdMTwCg8/BmBGHwEM5VzpZhQOaxs33S b+0AoJYaGb5poaDdEx+FSxM2kYGZiYhj =DdM8 -END PGP SIGNATURE- -- Jonathan Aquilina -- Please use reply-all for most replies to avoid omitting the mailing list. To unsubscribe or change options: https://lists.samba.org/mailman/listinfo/rsync Before posting, read: http://www.catb.org/~esr/faqs/smart-questions.html
Re: issues syncing between one host and another
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 The .current symlink is a pointer to the current backup. It should always be from the backup you just made to the fixed location of the path you are using readlink on. On 09/05/13 01:04, Jonathan Aquilina wrote: How would i need to create the sym link and to what? On Thu, Sep 5, 2013 at 7:03 AM, Kevin Korb k...@sanitarium.net mailto:k...@sanitarium.net wrote: No, it is linking the new target to the previous link-dest On 09/05/13 01:02, Jonathan Aquilina wrote: Doesnt my script already do that at the very end? On Thu, Sep 5, 2013 at 7:00 AM, Kevin Korb k...@sanitarium.net mailto:k...@sanitarium.net mailto:k...@sanitarium.net mailto:k...@sanitarium.net wrote: Ahh, I missed looking at the ln command. You are supposed to be linking the backup you just made to .current. So, ssh $user@$remotehost ln -sf $remotedir /home/aquj001/recievingDir.current On 09/05/13 00:54, Jonathan Aquilina wrote: Hey Kevin The path works as it is after i recreated the .current directory but im still having the issue of a directory on the remote being created with too many symbolic links in it and no files. On Wed, Sep 4, 2013 at 8:27 PM, Kevin Korb k...@sanitarium.net mailto:k...@sanitarium.net mailto:k...@sanitarium.net mailto:k...@sanitarium.net mailto:k...@sanitarium.net mailto:k...@sanitarium.net mailto:k...@sanitarium.net mailto:k...@sanitarium.net wrote: linkdest=$(ssh $user@$remotehost /usr/linux/bin/readlink/ /home/aquj001/recievingDir.current) There probably shouldn't be a trailing / on the readlink command. If that doesn't settle it is the path in the error message the target or the link-dest? If it is the target try sending a mkdir first. On 09/04/13 09:56, Jonathan Aquilina wrote: I have the following script that I am working on #!/bin/bash date=$(date +%F--%T) #ssh parameters user=aquj001 remotehost=qa4app localdir=/home/aquj001/INFENG/scripts remotedir=/home/aquj001/recievingDir.$date linkdest=$(ssh $user@$remotehost /usr/linux/bin/readlink/ /home/aquj001/recievingDir.current) rsync -a --compress --link-dest=$linkdest --out-format='%i %n%L %l %M' --omit-dir-times $localdir $user@$remotehost:$remotedir ssh $user@$remotehost /bin/rm -f /home/aquj001/recievingDir.current ssh $user@$remotehost ln -sf $remotedir $linkdest now the issue becomes when i run it, I get the following errors. rsync: change_dir#4 /home/aquj001/recievingDir.2013-09-04--15:53:16 failed: No such file or directory (2) rsync error: errors selecting input/output files, dirs (code 3) at main.c(877) [receiver=3.0.6] rsync: connection unexpectedly closed (9 bytes received so far) [sender] rsync error: error in rsync protocol data stream (code 12) at io.c(600) [sender=3.0.6] It still creates the directory on the remote machine but its empty and nothing but sym links. Any ideas as to what th eissue is would be greatly appreciated. This is on an AIX 6.1 system installed from the aix toolbox package. -- Jonathan Aquilina -- Please use reply-all for most replies to avoid omitting the mailing list. To unsubscribe or change options: https://lists.samba.org/mailman/listinfo/rsync Before posting, read: http://www.catb.org/~esr/faqs/smart-questions.html -- Jonathan Aquilina -- Jonathan Aquilina -- Jonathan Aquilina - -- ~*-,._.,-*~'`^`'~*-,._.,-*~'`^`'~*-,._.,-*~'`^`'~*-,._.,-*~'`^`'~*-,._.,-*~ Kevin Korb Phone:(407) 252-6853 Systems Administrator Internet: FutureQuest, Inc. ke...@futurequest.net (work) Orlando, Floridak...@sanitarium.net (personal) Web page: http://www.sanitarium.net/ PGP public key available on web site. ~*-,._.,-*~'`^`'~*-,._.,-*~'`^`'~*-,._.,-*~'`^`'~*-,._.,-*~'`^`'~*-,._.,-*~ -BEGIN PGP SIGNATURE- Version: GnuPG v2.0.20 (GNU/Linux) Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/ iEYEARECAAYFAlIoEUYACgkQVKC1jlbQAQe7fACfZNVdpmkfBCOEgqTPrpbGF93W tqwAnA8x6Gtvgrcj9nBfVvSgx2gcnGiR =eXwi -END PGP SIGNATURE- -- Please use reply-all for most replies to avoid omitting the mailing list. To unsubscribe or change options: https://lists.samba.org/mailman/listinfo/rsync Before posting, read: http://www.catb.org/~esr/faqs/smart-questions.html
Re: issues syncing between one host and another
So if i basically sym link the empty backup with the sym link loop to the current directory it should fix the issue? what would happen though if i want to remove the oldest directory which was synced after 7 days would i have issues then like i am experiencing now? On Thu, Sep 5, 2013 at 7:06 AM, Kevin Korb k...@sanitarium.net wrote: -BEGIN PGP SIGNED MESSAGE- Hash: SHA1 The .current symlink is a pointer to the current backup. It should always be from the backup you just made to the fixed location of the path you are using readlink on. On 09/05/13 01:04, Jonathan Aquilina wrote: How would i need to create the sym link and to what? On Thu, Sep 5, 2013 at 7:03 AM, Kevin Korb k...@sanitarium.net mailto:k...@sanitarium.net wrote: No, it is linking the new target to the previous link-dest On 09/05/13 01:02, Jonathan Aquilina wrote: Doesnt my script already do that at the very end? On Thu, Sep 5, 2013 at 7:00 AM, Kevin Korb k...@sanitarium.net mailto:k...@sanitarium.net mailto:k...@sanitarium.net mailto:k...@sanitarium.net wrote: Ahh, I missed looking at the ln command. You are supposed to be linking the backup you just made to .current. So, ssh $user@$remotehost ln -sf $remotedir /home/aquj001/recievingDir.current On 09/05/13 00:54, Jonathan Aquilina wrote: Hey Kevin The path works as it is after i recreated the .current directory but im still having the issue of a directory on the remote being created with too many symbolic links in it and no files. On Wed, Sep 4, 2013 at 8:27 PM, Kevin Korb k...@sanitarium.net mailto:k...@sanitarium.net mailto:k...@sanitarium.net mailto:k...@sanitarium.net mailto:k...@sanitarium.net mailto:k...@sanitarium.net mailto:k...@sanitarium.net mailto:k...@sanitarium.net wrote: linkdest=$(ssh $user@$remotehost /usr/linux/bin/readlink/ /home/aquj001/recievingDir.current) There probably shouldn't be a trailing / on the readlink command. If that doesn't settle it is the path in the error message the target or the link-dest? If it is the target try sending a mkdir first. On 09/04/13 09:56, Jonathan Aquilina wrote: I have the following script that I am working on #!/bin/bash date=$(date +%F--%T) #ssh parameters user=aquj001 remotehost=qa4app localdir=/home/aquj001/INFENG/scripts remotedir=/home/aquj001/recievingDir.$date linkdest=$(ssh $user@$remotehost /usr/linux/bin/readlink/ /home/aquj001/recievingDir.current) rsync -a --compress --link-dest=$linkdest --out-format='%i %n%L %l %M' --omit-dir-times $localdir $user@$remotehost:$remotedir ssh $user@$remotehost /bin/rm -f /home/aquj001/recievingDir.current ssh $user@$remotehost ln -sf $remotedir $linkdest now the issue becomes when i run it, I get the following errors. rsync: change_dir#4 /home/aquj001/recievingDir.2013-09-04--15:53:16 failed: No such file or directory (2) rsync error: errors selecting input/output files, dirs (code 3) at main.c(877) [receiver=3.0.6] rsync: connection unexpectedly closed (9 bytes received so far) [sender] rsync error: error in rsync protocol data stream (code 12) at io.c(600) [sender=3.0.6] It still creates the directory on the remote machine but its empty and nothing but sym links. Any ideas as to what th eissue is would be greatly appreciated. This is on an AIX 6.1 system installed from the aix toolbox package. -- Jonathan Aquilina -- Please use reply-all for most replies to avoid omitting the mailing list. To unsubscribe or change options: https://lists.samba.org/mailman/listinfo/rsync Before posting, read: http://www.catb.org/~esr/faqs/smart-questions.html -- Jonathan Aquilina -- Jonathan Aquilina -- Jonathan Aquilina - -- ~*-,._.,-*~'`^`'~*-,._.,-*~'`^`'~*-,._.,-*~'`^`'~*-,._.,-*~'`^`'~*-,._.,-*~ Kevin Korb Phone:(407) 252-6853 Systems Administrator Internet: FutureQuest, Inc. ke...@futurequest.net (work) Orlando, Floridak...@sanitarium.net (personal) Web page: http://www.sanitarium.net/ PGP public key available on web site. ~*-,._.,-*~'`^`'~*-,._.,-*~'`^`'~*-,._.,-*~'`^`'~*-,._.,-*~'`^`'~*-,._.,-*~ -BEGIN PGP SIGNATURE- Version: GnuPG v2.0.20 (GNU/Linux) Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/ iEYEARECAAYFAlIoEUYACgkQVKC1jlbQAQe7fACfZNVdpmkfBCOEgqTPrpbGF93W tqwAnA8x6Gtvgrcj9nBfVvSgx2gcnGiR =eXwi -END PGP SIGNATURE- -- Jonathan Aquilina -- Please use reply-all for most replies to avoid omitting the mailing list. To unsubscribe or change options: https://lists.samba.org/mailman/listinfo/rsync Before posting, read: http://www.catb.org/~esr/faqs/smart-questions.html
Re: issues syncing between one host and another
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 The symlink is only a pointer so that you can readlink it on the next run to determine what to use as your --link-dest parameter. It is simply a pointer to the latest directory. Deleting old stuff is a different concept. You have a list of directories with dates and times in the names. A simple ls will list them in order. Any scripting language will have the ability to sort a list of file names. So, you make a sorted list then delete however many you have that are more than the number of them you want starting with the oldest. The current symlink is only pointing to the newest so it would only matter in the deletions if you are deleting all of the backups. On 09/05/13 01:08, Jonathan Aquilina wrote: So if i basically sym link the empty backup with the sym link loop to the current directory it should fix the issue? what would happen though if i want to remove the oldest directory which was synced after 7 days would i have issues then like i am experiencing now? On Thu, Sep 5, 2013 at 7:06 AM, Kevin Korb k...@sanitarium.net mailto:k...@sanitarium.net wrote: The .current symlink is a pointer to the current backup. It should always be from the backup you just made to the fixed location of the path you are using readlink on. On 09/05/13 01:04, Jonathan Aquilina wrote: How would i need to create the sym link and to what? On Thu, Sep 5, 2013 at 7:03 AM, Kevin Korb k...@sanitarium.net mailto:k...@sanitarium.net mailto:k...@sanitarium.net mailto:k...@sanitarium.net wrote: No, it is linking the new target to the previous link-dest On 09/05/13 01:02, Jonathan Aquilina wrote: Doesnt my script already do that at the very end? On Thu, Sep 5, 2013 at 7:00 AM, Kevin Korb k...@sanitarium.net mailto:k...@sanitarium.net mailto:k...@sanitarium.net mailto:k...@sanitarium.net mailto:k...@sanitarium.net mailto:k...@sanitarium.net mailto:k...@sanitarium.net mailto:k...@sanitarium.net wrote: Ahh, I missed looking at the ln command. You are supposed to be linking the backup you just made to .current. So, ssh $user@$remotehost ln -sf $remotedir /home/aquj001/recievingDir.current On 09/05/13 00:54, Jonathan Aquilina wrote: Hey Kevin The path works as it is after i recreated the .current directory but im still having the issue of a directory on the remote being created with too many symbolic links in it and no files. On Wed, Sep 4, 2013 at 8:27 PM, Kevin Korb k...@sanitarium.net mailto:k...@sanitarium.net mailto:k...@sanitarium.net mailto:k...@sanitarium.net mailto:k...@sanitarium.net mailto:k...@sanitarium.net mailto:k...@sanitarium.net mailto:k...@sanitarium.net mailto:k...@sanitarium.net mailto:k...@sanitarium.net mailto:k...@sanitarium.net mailto:k...@sanitarium.net mailto:k...@sanitarium.net mailto:k...@sanitarium.net mailto:k...@sanitarium.net mailto:k...@sanitarium.net wrote: linkdest=$(ssh $user@$remotehost /usr/linux/bin/readlink/ /home/aquj001/recievingDir.current) There probably shouldn't be a trailing / on the readlink command. If that doesn't settle it is the path in the error message the target or the link-dest? If it is the target try sending a mkdir first. On 09/04/13 09:56, Jonathan Aquilina wrote: I have the following script that I am working on #!/bin/bash date=$(date +%F--%T) #ssh parameters user=aquj001 remotehost=qa4app localdir=/home/aquj001/INFENG/scripts remotedir=/home/aquj001/recievingDir.$date linkdest=$(ssh $user@$remotehost /usr/linux/bin/readlink/ /home/aquj001/recievingDir.current) rsync -a --compress --link-dest=$linkdest --out-format='%i %n%L %l %M' --omit-dir-times $localdir $user@$remotehost:$remotedir ssh $user@$remotehost /bin/rm -f /home/aquj001/recievingDir.current ssh $user@$remotehost ln -sf $remotedir $linkdest now the issue becomes when i run it, I get the following errors. rsync: change_dir#4 /home/aquj001/recievingDir.2013-09-04--15:53:16 failed: No such file or directory (2) rsync error: errors selecting input/output files, dirs (code 3) at main.c(877) [receiver=3.0.6] rsync: connection unexpectedly closed (9 bytes received so far) [sender] rsync error: error in rsync protocol data stream (code 12) at io.c(600) [sender=3.0.6] It still creates the directory on the remote machine but its empty and nothing but sym links. Any ideas as to what th eissue is would be greatly appreciated. This is on an AIX 6.1 system installed from the aix toolbox package. -- Jonathan Aquilina -- Please use reply-all for most replies to avoid omitting the mailing list. To unsubscribe or change options: https://lists.samba.org/mailman/listinfo/rsync Before posting, read: http://www.catb.org/~esr/faqs/smart-questions.html -- Jonathan Aquilina -- Jonathan Aquilina -- Jonathan Aquilina -- Jonathan Aquilina - --
Re: issues syncing between one host and another
Understood, What do i need to sym link together? On Thu, Sep 5, 2013 at 7:34 AM, Kevin Korb k...@sanitarium.net wrote: -BEGIN PGP SIGNED MESSAGE- Hash: SHA1 The symlink is only a pointer so that you can readlink it on the next run to determine what to use as your --link-dest parameter. It is simply a pointer to the latest directory. Deleting old stuff is a different concept. You have a list of directories with dates and times in the names. A simple ls will list them in order. Any scripting language will have the ability to sort a list of file names. So, you make a sorted list then delete however many you have that are more than the number of them you want starting with the oldest. The current symlink is only pointing to the newest so it would only matter in the deletions if you are deleting all of the backups. On 09/05/13 01:08, Jonathan Aquilina wrote: So if i basically sym link the empty backup with the sym link loop to the current directory it should fix the issue? what would happen though if i want to remove the oldest directory which was synced after 7 days would i have issues then like i am experiencing now? On Thu, Sep 5, 2013 at 7:06 AM, Kevin Korb k...@sanitarium.net mailto:k...@sanitarium.net wrote: The .current symlink is a pointer to the current backup. It should always be from the backup you just made to the fixed location of the path you are using readlink on. On 09/05/13 01:04, Jonathan Aquilina wrote: How would i need to create the sym link and to what? On Thu, Sep 5, 2013 at 7:03 AM, Kevin Korb k...@sanitarium.net mailto:k...@sanitarium.net mailto:k...@sanitarium.net mailto:k...@sanitarium.net wrote: No, it is linking the new target to the previous link-dest On 09/05/13 01:02, Jonathan Aquilina wrote: Doesnt my script already do that at the very end? On Thu, Sep 5, 2013 at 7:00 AM, Kevin Korb k...@sanitarium.net mailto:k...@sanitarium.net mailto:k...@sanitarium.net mailto:k...@sanitarium.net mailto:k...@sanitarium.net mailto:k...@sanitarium.net mailto:k...@sanitarium.net mailto:k...@sanitarium.net wrote: Ahh, I missed looking at the ln command. You are supposed to be linking the backup you just made to .current. So, ssh $user@$remotehost ln -sf $remotedir /home/aquj001/recievingDir.current On 09/05/13 00:54, Jonathan Aquilina wrote: Hey Kevin The path works as it is after i recreated the .current directory but im still having the issue of a directory on the remote being created with too many symbolic links in it and no files. On Wed, Sep 4, 2013 at 8:27 PM, Kevin Korb k...@sanitarium.net mailto:k...@sanitarium.net mailto:k...@sanitarium.net mailto:k...@sanitarium.net mailto:k...@sanitarium.net mailto:k...@sanitarium.net mailto:k...@sanitarium.net mailto:k...@sanitarium.net mailto:k...@sanitarium.net mailto:k...@sanitarium.net mailto:k...@sanitarium.net mailto:k...@sanitarium.net mailto:k...@sanitarium.net mailto:k...@sanitarium.net mailto:k...@sanitarium.net mailto:k...@sanitarium.net wrote: linkdest=$(ssh $user@$remotehost /usr/linux/bin/readlink/ /home/aquj001/recievingDir.current) There probably shouldn't be a trailing / on the readlink command. If that doesn't settle it is the path in the error message the target or the link-dest? If it is the target try sending a mkdir first. On 09/04/13 09:56, Jonathan Aquilina wrote: I have the following script that I am working on #!/bin/bash date=$(date +%F--%T) #ssh parameters user=aquj001 remotehost=qa4app localdir=/home/aquj001/INFENG/scripts remotedir=/home/aquj001/recievingDir.$date linkdest=$(ssh $user@$remotehost /usr/linux/bin/readlink/ /home/aquj001/recievingDir.current) rsync -a --compress --link-dest=$linkdest --out-format='%i %n%L %l %M' --omit-dir-times $localdir $user@$remotehost:$remotedir ssh $user@$remotehost /bin/rm -f /home/aquj001/recievingDir.current ssh $user@$remotehost ln -sf $remotedir $linkdest now the issue becomes when i run it, I get the following errors. rsync: change_dir#4 /home/aquj001/recievingDir.2013-09-04--15:53:16 failed: No such file or directory (2) rsync error: errors selecting input/output files, dirs (code 3) at main.c(877) [receiver=3.0.6] rsync: connection unexpectedly closed (9 bytes received so far) [sender] rsync error: error in rsync protocol data stream (code 12) at io.c(600) [sender=3.0.6] It still creates the directory on the remote machine but its empty and nothing but sym links. Any ideas as to what th eissue is would be greatly appreciated. This is on an AIX 6.1 system installed from the aix toolbox package. -- Jonathan Aquilina -- Please use reply-all for most replies to avoid omitting the mailing list. To unsubscribe or change options: https://lists.samba.org/mailman/listinfo/rsync Before posting, read:
Re: issues syncing between one host and another
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 The backup you just made to the current pointer you will readlink on the next run. On 09/05/13 01:36, Jonathan Aquilina wrote: Understood, What do i need to sym link together? On Thu, Sep 5, 2013 at 7:34 AM, Kevin Korb k...@sanitarium.net mailto:k...@sanitarium.net wrote: The symlink is only a pointer so that you can readlink it on the next run to determine what to use as your --link-dest parameter. It is simply a pointer to the latest directory. Deleting old stuff is a different concept. You have a list of directories with dates and times in the names. A simple ls will list them in order. Any scripting language will have the ability to sort a list of file names. So, you make a sorted list then delete however many you have that are more than the number of them you want starting with the oldest. The current symlink is only pointing to the newest so it would only matter in the deletions if you are deleting all of the backups. On 09/05/13 01:08, Jonathan Aquilina wrote: So if i basically sym link the empty backup with the sym link loop to the current directory it should fix the issue? what would happen though if i want to remove the oldest directory which was synced after 7 days would i have issues then like i am experiencing now? On Thu, Sep 5, 2013 at 7:06 AM, Kevin Korb k...@sanitarium.net mailto:k...@sanitarium.net mailto:k...@sanitarium.net mailto:k...@sanitarium.net wrote: The .current symlink is a pointer to the current backup. It should always be from the backup you just made to the fixed location of the path you are using readlink on. On 09/05/13 01:04, Jonathan Aquilina wrote: How would i need to create the sym link and to what? On Thu, Sep 5, 2013 at 7:03 AM, Kevin Korb k...@sanitarium.net mailto:k...@sanitarium.net mailto:k...@sanitarium.net mailto:k...@sanitarium.net mailto:k...@sanitarium.net mailto:k...@sanitarium.net mailto:k...@sanitarium.net mailto:k...@sanitarium.net wrote: No, it is linking the new target to the previous link-dest On 09/05/13 01:02, Jonathan Aquilina wrote: Doesnt my script already do that at the very end? On Thu, Sep 5, 2013 at 7:00 AM, Kevin Korb k...@sanitarium.net mailto:k...@sanitarium.net mailto:k...@sanitarium.net mailto:k...@sanitarium.net mailto:k...@sanitarium.net mailto:k...@sanitarium.net mailto:k...@sanitarium.net mailto:k...@sanitarium.net mailto:k...@sanitarium.net mailto:k...@sanitarium.net mailto:k...@sanitarium.net mailto:k...@sanitarium.net mailto:k...@sanitarium.net mailto:k...@sanitarium.net mailto:k...@sanitarium.net mailto:k...@sanitarium.net wrote: Ahh, I missed looking at the ln command. You are supposed to be linking the backup you just made to .current. So, ssh $user@$remotehost ln -sf $remotedir /home/aquj001/recievingDir.current On 09/05/13 00:54, Jonathan Aquilina wrote: Hey Kevin The path works as it is after i recreated the .current directory but im still having the issue of a directory on the remote being created with too many symbolic links in it and no files. On Wed, Sep 4, 2013 at 8:27 PM, Kevin Korb k...@sanitarium.net mailto:k...@sanitarium.net mailto:k...@sanitarium.net mailto:k...@sanitarium.net mailto:k...@sanitarium.net mailto:k...@sanitarium.net mailto:k...@sanitarium.net mailto:k...@sanitarium.net mailto:k...@sanitarium.net mailto:k...@sanitarium.net mailto:k...@sanitarium.net mailto:k...@sanitarium.net mailto:k...@sanitarium.net mailto:k...@sanitarium.net mailto:k...@sanitarium.net mailto:k...@sanitarium.net mailto:k...@sanitarium.net mailto:k...@sanitarium.net mailto:k...@sanitarium.net mailto:k...@sanitarium.net mailto:k...@sanitarium.net mailto:k...@sanitarium.net mailto:k...@sanitarium.net mailto:k...@sanitarium.net mailto:k...@sanitarium.net mailto:k...@sanitarium.net mailto:k...@sanitarium.net mailto:k...@sanitarium.net mailto:k...@sanitarium.net mailto:k...@sanitarium.net mailto:k...@sanitarium.net mailto:k...@sanitarium.net wrote: linkdest=$(ssh $user@$remotehost /usr/linux/bin/readlink/ /home/aquj001/recievingDir.current) There probably shouldn't be a trailing / on the readlink command. If that doesn't settle it is the path in the error message the target or the link-dest? If it is the target try sending a mkdir first. On 09/04/13 09:56, Jonathan Aquilina wrote: I have the following script that I am working on #!/bin/bash date=$(date +%F--%T) #ssh parameters user=aquj001 remotehost=qa4app localdir=/home/aquj001/INFENG/scripts remotedir=/home/aquj001/recievingDir.$date linkdest=$(ssh $user@$remotehost /usr/linux/bin/readlink/ /home/aquj001/recievingDir.current) rsync -a --compress --link-dest=$linkdest --out-format='%i %n%L %l %M' --omit-dir-times $localdir $user@$remotehost:$remotedir ssh $user@$remotehost /bin/rm -f /home/aquj001/recievingDir.current ssh $user@$remotehost ln -sf $remotedir
Re: issues syncing between one host and another
The current pointer being the recieveDir.current correct? On Thu, Sep 5, 2013 at 7:37 AM, Kevin Korb k...@sanitarium.net wrote: -BEGIN PGP SIGNED MESSAGE- Hash: SHA1 The backup you just made to the current pointer you will readlink on the next run. On 09/05/13 01:36, Jonathan Aquilina wrote: Understood, What do i need to sym link together? On Thu, Sep 5, 2013 at 7:34 AM, Kevin Korb k...@sanitarium.net mailto:k...@sanitarium.net wrote: The symlink is only a pointer so that you can readlink it on the next run to determine what to use as your --link-dest parameter. It is simply a pointer to the latest directory. Deleting old stuff is a different concept. You have a list of directories with dates and times in the names. A simple ls will list them in order. Any scripting language will have the ability to sort a list of file names. So, you make a sorted list then delete however many you have that are more than the number of them you want starting with the oldest. The current symlink is only pointing to the newest so it would only matter in the deletions if you are deleting all of the backups. On 09/05/13 01:08, Jonathan Aquilina wrote: So if i basically sym link the empty backup with the sym link loop to the current directory it should fix the issue? what would happen though if i want to remove the oldest directory which was synced after 7 days would i have issues then like i am experiencing now? On Thu, Sep 5, 2013 at 7:06 AM, Kevin Korb k...@sanitarium.net mailto:k...@sanitarium.net mailto:k...@sanitarium.net mailto:k...@sanitarium.net wrote: The .current symlink is a pointer to the current backup. It should always be from the backup you just made to the fixed location of the path you are using readlink on. On 09/05/13 01:04, Jonathan Aquilina wrote: How would i need to create the sym link and to what? On Thu, Sep 5, 2013 at 7:03 AM, Kevin Korb k...@sanitarium.net mailto:k...@sanitarium.net mailto:k...@sanitarium.net mailto:k...@sanitarium.net mailto:k...@sanitarium.net mailto:k...@sanitarium.net mailto:k...@sanitarium.net mailto:k...@sanitarium.net wrote: No, it is linking the new target to the previous link-dest On 09/05/13 01:02, Jonathan Aquilina wrote: Doesnt my script already do that at the very end? On Thu, Sep 5, 2013 at 7:00 AM, Kevin Korb k...@sanitarium.net mailto:k...@sanitarium.net mailto:k...@sanitarium.net mailto:k...@sanitarium.net mailto:k...@sanitarium.net mailto:k...@sanitarium.net mailto:k...@sanitarium.net mailto:k...@sanitarium.net mailto:k...@sanitarium.net mailto:k...@sanitarium.net mailto:k...@sanitarium.net mailto:k...@sanitarium.net mailto:k...@sanitarium.net mailto:k...@sanitarium.net mailto:k...@sanitarium.net mailto:k...@sanitarium.net wrote: Ahh, I missed looking at the ln command. You are supposed to be linking the backup you just made to .current. So, ssh $user@$remotehost ln -sf $remotedir /home/aquj001/recievingDir.current On 09/05/13 00:54, Jonathan Aquilina wrote: Hey Kevin The path works as it is after i recreated the .current directory but im still having the issue of a directory on the remote being created with too many symbolic links in it and no files. On Wed, Sep 4, 2013 at 8:27 PM, Kevin Korb k...@sanitarium.net mailto:k...@sanitarium.net mailto:k...@sanitarium.net mailto:k...@sanitarium.net mailto:k...@sanitarium.net mailto:k...@sanitarium.net mailto:k...@sanitarium.net mailto:k...@sanitarium.net mailto:k...@sanitarium.net mailto:k...@sanitarium.net mailto:k...@sanitarium.net mailto:k...@sanitarium.net mailto:k...@sanitarium.net mailto:k...@sanitarium.net mailto:k...@sanitarium.net mailto:k...@sanitarium.net mailto:k...@sanitarium.net mailto:k...@sanitarium.net mailto:k...@sanitarium.net mailto:k...@sanitarium.net mailto:k...@sanitarium.net mailto:k...@sanitarium.net mailto:k...@sanitarium.net mailto:k...@sanitarium.net mailto:k...@sanitarium.net mailto:k...@sanitarium.net mailto:k...@sanitarium.net mailto:k...@sanitarium.net mailto:k...@sanitarium.net mailto:k...@sanitarium.net mailto:k...@sanitarium.net mailto:k...@sanitarium.net wrote: linkdest=$(ssh $user@$remotehost /usr/linux/bin/readlink/ /home/aquj001/recievingDir.current) There probably shouldn't be a trailing / on the readlink command. If that doesn't settle it is the path in the error message the target or the link-dest? If it is the target try sending a mkdir first. On 09/04/13 09:56, Jonathan Aquilina wrote: I have the following script that I am working on #!/bin/bash date=$(date +%F--%T) #ssh parameters user=aquj001 remotehost=qa4app localdir=/home/aquj001/INFENG/scripts remotedir=/home/aquj001/recievingDir.$date linkdest=$(ssh $user@$remotehost /usr/linux/bin/readlink/ /home/aquj001/recievingDir.current) rsync -a --compress
Re: issues syncing between one host and another
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Yes. On 09/05/13 01:38, Jonathan Aquilina wrote: The current pointer being the recieveDir.current correct? On Thu, Sep 5, 2013 at 7:37 AM, Kevin Korb k...@sanitarium.net mailto:k...@sanitarium.net wrote: The backup you just made to the current pointer you will readlink on the next run. On 09/05/13 01:36, Jonathan Aquilina wrote: Understood, What do i need to sym link together? On Thu, Sep 5, 2013 at 7:34 AM, Kevin Korb k...@sanitarium.net mailto:k...@sanitarium.net mailto:k...@sanitarium.net mailto:k...@sanitarium.net wrote: The symlink is only a pointer so that you can readlink it on the next run to determine what to use as your --link-dest parameter. It is simply a pointer to the latest directory. Deleting old stuff is a different concept. You have a list of directories with dates and times in the names. A simple ls will list them in order. Any scripting language will have the ability to sort a list of file names. So, you make a sorted list then delete however many you have that are more than the number of them you want starting with the oldest. The current symlink is only pointing to the newest so it would only matter in the deletions if you are deleting all of the backups. On 09/05/13 01:08, Jonathan Aquilina wrote: So if i basically sym link the empty backup with the sym link loop to the current directory it should fix the issue? what would happen though if i want to remove the oldest directory which was synced after 7 days would i have issues then like i am experiencing now? On Thu, Sep 5, 2013 at 7:06 AM, Kevin Korb k...@sanitarium.net mailto:k...@sanitarium.net mailto:k...@sanitarium.net mailto:k...@sanitarium.net mailto:k...@sanitarium.net mailto:k...@sanitarium.net mailto:k...@sanitarium.net mailto:k...@sanitarium.net wrote: The .current symlink is a pointer to the current backup. It should always be from the backup you just made to the fixed location of the path you are using readlink on. On 09/05/13 01:04, Jonathan Aquilina wrote: How would i need to create the sym link and to what? On Thu, Sep 5, 2013 at 7:03 AM, Kevin Korb k...@sanitarium.net mailto:k...@sanitarium.net mailto:k...@sanitarium.net mailto:k...@sanitarium.net mailto:k...@sanitarium.net mailto:k...@sanitarium.net mailto:k...@sanitarium.net mailto:k...@sanitarium.net mailto:k...@sanitarium.net mailto:k...@sanitarium.net mailto:k...@sanitarium.net mailto:k...@sanitarium.net mailto:k...@sanitarium.net mailto:k...@sanitarium.net mailto:k...@sanitarium.net mailto:k...@sanitarium.net wrote: No, it is linking the new target to the previous link-dest On 09/05/13 01:02, Jonathan Aquilina wrote: Doesnt my script already do that at the very end? On Thu, Sep 5, 2013 at 7:00 AM, Kevin Korb k...@sanitarium.net mailto:k...@sanitarium.net mailto:k...@sanitarium.net mailto:k...@sanitarium.net mailto:k...@sanitarium.net mailto:k...@sanitarium.net mailto:k...@sanitarium.net mailto:k...@sanitarium.net mailto:k...@sanitarium.net mailto:k...@sanitarium.net mailto:k...@sanitarium.net mailto:k...@sanitarium.net mailto:k...@sanitarium.net mailto:k...@sanitarium.net mailto:k...@sanitarium.net mailto:k...@sanitarium.net mailto:k...@sanitarium.net mailto:k...@sanitarium.net mailto:k...@sanitarium.net mailto:k...@sanitarium.net mailto:k...@sanitarium.net mailto:k...@sanitarium.net mailto:k...@sanitarium.net mailto:k...@sanitarium.net mailto:k...@sanitarium.net mailto:k...@sanitarium.net mailto:k...@sanitarium.net mailto:k...@sanitarium.net mailto:k...@sanitarium.net mailto:k...@sanitarium.net mailto:k...@sanitarium.net mailto:k...@sanitarium.net wrote: Ahh, I missed looking at the ln command. You are supposed to be linking the backup you just made to .current. So, ssh $user@$remotehost ln -sf $remotedir /home/aquj001/recievingDir.current On 09/05/13 00:54, Jonathan Aquilina wrote: Hey Kevin The path works as it is after i recreated the .current directory but im still having the issue of a directory on the remote being created with too many symbolic links in it and no files. On Wed, Sep 4, 2013 at 8:27 PM, Kevin Korb k...@sanitarium.net mailto:k...@sanitarium.net mailto:k...@sanitarium.net mailto:k...@sanitarium.net mailto:k...@sanitarium.net mailto:k...@sanitarium.net mailto:k...@sanitarium.net mailto:k...@sanitarium.net mailto:k...@sanitarium.net mailto:k...@sanitarium.net mailto:k...@sanitarium.net mailto:k...@sanitarium.net mailto:k...@sanitarium.net mailto:k...@sanitarium.net mailto:k...@sanitarium.net mailto:k...@sanitarium.net mailto:k...@sanitarium.net mailto:k...@sanitarium.net mailto:k...@sanitarium.net mailto:k...@sanitarium.net mailto:k...@sanitarium.net mailto:k...@sanitarium.net mailto:k...@sanitarium.net mailto:k...@sanitarium.net mailto:k...@sanitarium.net mailto:k...@sanitarium.net mailto:k...@sanitarium.net mailto:k...@sanitarium.net
Re: issues syncing between one host and another
What will happen if the first directory which is the oldest gets deleted wouldnt i have to re link the next directory with the .current one? On Thu, Sep 5, 2013 at 7:39 AM, Kevin Korb k...@sanitarium.net wrote: -BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Yes. On 09/05/13 01:38, Jonathan Aquilina wrote: The current pointer being the recieveDir.current correct? On Thu, Sep 5, 2013 at 7:37 AM, Kevin Korb k...@sanitarium.net mailto:k...@sanitarium.net wrote: The backup you just made to the current pointer you will readlink on the next run. On 09/05/13 01:36, Jonathan Aquilina wrote: Understood, What do i need to sym link together? On Thu, Sep 5, 2013 at 7:34 AM, Kevin Korb k...@sanitarium.net mailto:k...@sanitarium.net mailto:k...@sanitarium.net mailto:k...@sanitarium.net wrote: The symlink is only a pointer so that you can readlink it on the next run to determine what to use as your --link-dest parameter. It is simply a pointer to the latest directory. Deleting old stuff is a different concept. You have a list of directories with dates and times in the names. A simple ls will list them in order. Any scripting language will have the ability to sort a list of file names. So, you make a sorted list then delete however many you have that are more than the number of them you want starting with the oldest. The current symlink is only pointing to the newest so it would only matter in the deletions if you are deleting all of the backups. On 09/05/13 01:08, Jonathan Aquilina wrote: So if i basically sym link the empty backup with the sym link loop to the current directory it should fix the issue? what would happen though if i want to remove the oldest directory which was synced after 7 days would i have issues then like i am experiencing now? On Thu, Sep 5, 2013 at 7:06 AM, Kevin Korb k...@sanitarium.net mailto:k...@sanitarium.net mailto:k...@sanitarium.net mailto:k...@sanitarium.net mailto:k...@sanitarium.net mailto:k...@sanitarium.net mailto:k...@sanitarium.net mailto:k...@sanitarium.net wrote: The .current symlink is a pointer to the current backup. It should always be from the backup you just made to the fixed location of the path you are using readlink on. On 09/05/13 01:04, Jonathan Aquilina wrote: How would i need to create the sym link and to what? On Thu, Sep 5, 2013 at 7:03 AM, Kevin Korb k...@sanitarium.net mailto:k...@sanitarium.net mailto:k...@sanitarium.net mailto:k...@sanitarium.net mailto:k...@sanitarium.net mailto:k...@sanitarium.net mailto:k...@sanitarium.net mailto:k...@sanitarium.net mailto:k...@sanitarium.net mailto:k...@sanitarium.net mailto:k...@sanitarium.net mailto:k...@sanitarium.net mailto:k...@sanitarium.net mailto:k...@sanitarium.net mailto:k...@sanitarium.net mailto:k...@sanitarium.net wrote: No, it is linking the new target to the previous link-dest On 09/05/13 01:02, Jonathan Aquilina wrote: Doesnt my script already do that at the very end? On Thu, Sep 5, 2013 at 7:00 AM, Kevin Korb k...@sanitarium.net mailto:k...@sanitarium.net mailto:k...@sanitarium.net mailto:k...@sanitarium.net mailto:k...@sanitarium.net mailto:k...@sanitarium.net mailto:k...@sanitarium.net mailto:k...@sanitarium.net mailto:k...@sanitarium.net mailto:k...@sanitarium.net mailto:k...@sanitarium.net mailto:k...@sanitarium.net mailto:k...@sanitarium.net mailto:k...@sanitarium.net mailto:k...@sanitarium.net mailto:k...@sanitarium.net mailto:k...@sanitarium.net mailto:k...@sanitarium.net mailto:k...@sanitarium.net mailto:k...@sanitarium.net mailto:k...@sanitarium.net mailto:k...@sanitarium.net mailto:k...@sanitarium.net mailto:k...@sanitarium.net mailto:k...@sanitarium.net mailto:k...@sanitarium.net mailto:k...@sanitarium.net mailto:k...@sanitarium.net mailto:k...@sanitarium.net mailto:k...@sanitarium.net mailto:k...@sanitarium.net mailto:k...@sanitarium.net wrote: Ahh, I missed looking at the ln command. You are supposed to be linking the backup you just made to .current. So, ssh $user@$remotehost ln -sf $remotedir /home/aquj001/recievingDir.current On 09/05/13 00:54, Jonathan Aquilina wrote: Hey Kevin The path works as it is after i recreated the .current directory but im still having the issue of a directory on the remote being created with too many symbolic links in it and no files. On Wed, Sep 4, 2013 at 8:27 PM, Kevin Korb k...@sanitarium.net mailto:k...@sanitarium.net mailto:k...@sanitarium.net mailto:k...@sanitarium.net mailto:k...@sanitarium.net mailto:k...@sanitarium.net mailto:k...@sanitarium.net mailto:k...@sanitarium.net mailto:k...@sanitarium.net mailto:k...@sanitarium.net mailto:k...@sanitarium.net mailto:k...@sanitarium.net mailto:k...@sanitarium.net mailto:k...@sanitarium.net mailto:k...@sanitarium.net mailto:k...@sanitarium.net mailto:k...@sanitarium.net
Re: issues syncing between one host and another
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 There is only one current one. The oldest one can't be the one that the current symlink is pointing to unless there is only 1 backup. On 09/05/13 01:52, Jonathan Aquilina wrote: What will happen if the first directory which is the oldest gets deleted wouldnt i have to re link the next directory with the .current one? On Thu, Sep 5, 2013 at 7:39 AM, Kevin Korb k...@sanitarium.net mailto:k...@sanitarium.net wrote: Yes. On 09/05/13 01:38, Jonathan Aquilina wrote: The current pointer being the recieveDir.current correct? On Thu, Sep 5, 2013 at 7:37 AM, Kevin Korb k...@sanitarium.net mailto:k...@sanitarium.net mailto:k...@sanitarium.net mailto:k...@sanitarium.net wrote: The backup you just made to the current pointer you will readlink on the next run. On 09/05/13 01:36, Jonathan Aquilina wrote: Understood, What do i need to sym link together? On Thu, Sep 5, 2013 at 7:34 AM, Kevin Korb k...@sanitarium.net mailto:k...@sanitarium.net mailto:k...@sanitarium.net mailto:k...@sanitarium.net mailto:k...@sanitarium.net mailto:k...@sanitarium.net mailto:k...@sanitarium.net mailto:k...@sanitarium.net wrote: The symlink is only a pointer so that you can readlink it on the next run to determine what to use as your --link-dest parameter. It is simply a pointer to the latest directory. Deleting old stuff is a different concept. You have a list of directories with dates and times in the names. A simple ls will list them in order. Any scripting language will have the ability to sort a list of file names. So, you make a sorted list then delete however many you have that are more than the number of them you want starting with the oldest. The current symlink is only pointing to the newest so it would only matter in the deletions if you are deleting all of the backups. On 09/05/13 01:08, Jonathan Aquilina wrote: So if i basically sym link the empty backup with the sym link loop to the current directory it should fix the issue? what would happen though if i want to remove the oldest directory which was synced after 7 days would i have issues then like i am experiencing now? On Thu, Sep 5, 2013 at 7:06 AM, Kevin Korb k...@sanitarium.net mailto:k...@sanitarium.net mailto:k...@sanitarium.net mailto:k...@sanitarium.net mailto:k...@sanitarium.net mailto:k...@sanitarium.net mailto:k...@sanitarium.net mailto:k...@sanitarium.net mailto:k...@sanitarium.net mailto:k...@sanitarium.net mailto:k...@sanitarium.net mailto:k...@sanitarium.net mailto:k...@sanitarium.net mailto:k...@sanitarium.net mailto:k...@sanitarium.net mailto:k...@sanitarium.net wrote: The .current symlink is a pointer to the current backup. It should always be from the backup you just made to the fixed location of the path you are using readlink on. On 09/05/13 01:04, Jonathan Aquilina wrote: How would i need to create the sym link and to what? On Thu, Sep 5, 2013 at 7:03 AM, Kevin Korb k...@sanitarium.net mailto:k...@sanitarium.net mailto:k...@sanitarium.net mailto:k...@sanitarium.net mailto:k...@sanitarium.net mailto:k...@sanitarium.net mailto:k...@sanitarium.net mailto:k...@sanitarium.net mailto:k...@sanitarium.net mailto:k...@sanitarium.net mailto:k...@sanitarium.net mailto:k...@sanitarium.net mailto:k...@sanitarium.net mailto:k...@sanitarium.net mailto:k...@sanitarium.net mailto:k...@sanitarium.net mailto:k...@sanitarium.net mailto:k...@sanitarium.net mailto:k...@sanitarium.net mailto:k...@sanitarium.net mailto:k...@sanitarium.net mailto:k...@sanitarium.net mailto:k...@sanitarium.net mailto:k...@sanitarium.net mailto:k...@sanitarium.net mailto:k...@sanitarium.net mailto:k...@sanitarium.net mailto:k...@sanitarium.net mailto:k...@sanitarium.net mailto:k...@sanitarium.net mailto:k...@sanitarium.net mailto:k...@sanitarium.net wrote: No, it is linking the new target to the previous link-dest On 09/05/13 01:02, Jonathan Aquilina wrote: Doesnt my script already do that at the very end? On Thu, Sep 5, 2013 at 7:00 AM, Kevin Korb k...@sanitarium.net mailto:k...@sanitarium.net mailto:k...@sanitarium.net mailto:k...@sanitarium.net mailto:k...@sanitarium.net mailto:k...@sanitarium.net mailto:k...@sanitarium.net mailto:k...@sanitarium.net mailto:k...@sanitarium.net mailto:k...@sanitarium.net mailto:k...@sanitarium.net mailto:k...@sanitarium.net mailto:k...@sanitarium.net mailto:k...@sanitarium.net mailto:k...@sanitarium.net mailto:k...@sanitarium.net mailto:k...@sanitarium.net mailto:k...@sanitarium.net mailto:k...@sanitarium.net mailto:k...@sanitarium.net mailto:k...@sanitarium.net mailto:k...@sanitarium.net mailto:k...@sanitarium.net mailto:k...@sanitarium.net mailto:k...@sanitarium.net mailto:k...@sanitarium.net mailto:k...@sanitarium.net mailto:k...@sanitarium.net mailto:k...@sanitarium.net mailto:k...@sanitarium.net mailto:k...@sanitarium.net mailto:k...@sanitarium.net
Re: issues syncing between one host and another
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 First you rm the existing current link then you create a new one pointing at the backup you just made. It really is just a reference to use in the script to determine what the most recent backup is. The alternative would be to parse a directory listing to determine what the --link-dest parameter should be. On 09/05/13 01:55, Jonathan Aquilina wrote: So each subsequent sync links the new directory to the current one unless there is only one directory? On Thu, Sep 5, 2013 at 7:54 AM, Kevin Korb k...@sanitarium.net mailto:k...@sanitarium.net wrote: There is only one current one. The oldest one can't be the one that the current symlink is pointing to unless there is only 1 backup. On 09/05/13 01:52, Jonathan Aquilina wrote: What will happen if the first directory which is the oldest gets deleted wouldnt i have to re link the next directory with the .current one? On Thu, Sep 5, 2013 at 7:39 AM, Kevin Korb k...@sanitarium.net mailto:k...@sanitarium.net mailto:k...@sanitarium.net mailto:k...@sanitarium.net wrote: Yes. On 09/05/13 01:38, Jonathan Aquilina wrote: The current pointer being the recieveDir.current correct? On Thu, Sep 5, 2013 at 7:37 AM, Kevin Korb k...@sanitarium.net mailto:k...@sanitarium.net mailto:k...@sanitarium.net mailto:k...@sanitarium.net mailto:k...@sanitarium.net mailto:k...@sanitarium.net mailto:k...@sanitarium.net mailto:k...@sanitarium.net wrote: The backup you just made to the current pointer you will readlink on the next run. On 09/05/13 01:36, Jonathan Aquilina wrote: Understood, What do i need to sym link together? On Thu, Sep 5, 2013 at 7:34 AM, Kevin Korb k...@sanitarium.net mailto:k...@sanitarium.net mailto:k...@sanitarium.net mailto:k...@sanitarium.net mailto:k...@sanitarium.net mailto:k...@sanitarium.net mailto:k...@sanitarium.net mailto:k...@sanitarium.net mailto:k...@sanitarium.net mailto:k...@sanitarium.net mailto:k...@sanitarium.net mailto:k...@sanitarium.net mailto:k...@sanitarium.net mailto:k...@sanitarium.net mailto:k...@sanitarium.net mailto:k...@sanitarium.net wrote: The symlink is only a pointer so that you can readlink it on the next run to determine what to use as your --link-dest parameter. It is simply a pointer to the latest directory. Deleting old stuff is a different concept. You have a list of directories with dates and times in the names. A simple ls will list them in order. Any scripting language will have the ability to sort a list of file names. So, you make a sorted list then delete however many you have that are more than the number of them you want starting with the oldest. The current symlink is only pointing to the newest so it would only matter in the deletions if you are deleting all of the backups. On 09/05/13 01:08, Jonathan Aquilina wrote: So if i basically sym link the empty backup with the sym link loop to the current directory it should fix the issue? what would happen though if i want to remove the oldest directory which was synced after 7 days would i have issues then like i am experiencing now? On Thu, Sep 5, 2013 at 7:06 AM, Kevin Korb k...@sanitarium.net mailto:k...@sanitarium.net mailto:k...@sanitarium.net mailto:k...@sanitarium.net mailto:k...@sanitarium.net mailto:k...@sanitarium.net mailto:k...@sanitarium.net mailto:k...@sanitarium.net mailto:k...@sanitarium.net mailto:k...@sanitarium.net mailto:k...@sanitarium.net mailto:k...@sanitarium.net mailto:k...@sanitarium.net mailto:k...@sanitarium.net mailto:k...@sanitarium.net mailto:k...@sanitarium.net mailto:k...@sanitarium.net mailto:k...@sanitarium.net mailto:k...@sanitarium.net mailto:k...@sanitarium.net mailto:k...@sanitarium.net mailto:k...@sanitarium.net mailto:k...@sanitarium.net mailto:k...@sanitarium.net mailto:k...@sanitarium.net mailto:k...@sanitarium.net mailto:k...@sanitarium.net mailto:k...@sanitarium.net mailto:k...@sanitarium.net mailto:k...@sanitarium.net mailto:k...@sanitarium.net mailto:k...@sanitarium.net wrote: The .current symlink is a pointer to the current backup. It should always be from the backup you just made to the fixed location of the path you are using readlink on. On 09/05/13 01:04, Jonathan Aquilina wrote: How would i need to create the sym link and to what? On Thu, Sep 5, 2013 at 7:03 AM, Kevin Korb k...@sanitarium.net mailto:k...@sanitarium.net mailto:k...@sanitarium.net mailto:k...@sanitarium.net mailto:k...@sanitarium.net mailto:k...@sanitarium.net mailto:k...@sanitarium.net mailto:k...@sanitarium.net mailto:k...@sanitarium.net mailto:k...@sanitarium.net mailto:k...@sanitarium.net mailto:k...@sanitarium.net mailto:k...@sanitarium.net mailto:k...@sanitarium.net mailto:k...@sanitarium.net mailto:k...@sanitarium.net mailto:k...@sanitarium.net mailto:k...@sanitarium.net mailto:k...@sanitarium.net mailto:k...@sanitarium.net mailto:k...@sanitarium.net