Mailing List Archive
tlug.jp Mailing List tlug archive tlug Mailing List Archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]Re: [tlug] Run rsync based on time difference between local file and server file
- Date: Fri, 11 Nov 2011 16:30:57 +0000
- From: Bruno Raoult <braoult@example.com>
- Subject: Re: [tlug] Run rsync based on time difference between local file and server file
- References: <4EBCE24E.3070906@example.com> <CAJA1Y2Z1syjYXrdWiRdei8UMh-MjU_eu1oSBXXVfBUYeN6nkig@example.com> <4EBCF7A3.60304@example.com> <CA+hLB26MO+Pp2nogaWHAWLPGfGbSmJpG3410SPU0rWF_Sf7OQw@example.com> <4EBD36CE.6040204@example.com>
On Fri, Nov 11, 2011 at 14:53, Charles Muller <cmuller-lst@example.com> wrote:OK, I think I have an idea how to do this:
rsync -uvp -e ssh chuck@example.com:/directory/testfile1 /home/chuck/
if [ testfile1 -nt testfile2 ]; then
{Run rsync scripts down from server}
fi
if [ testfile1 -ot testfile2 ]; then
{Run rsync scripts up to server}
fi
...except that there might be UTC issues. It's late, I'll play with
it tomorrow.
I would not go this way... Rather, I would just run the rsync all the time both ways...
This will avoid a manual time check for each file...
So the script would be (with correct rsync time check options):
{Run rsync scripts down from server}
{Run rsync scripts up to server}
Bruno.
PS. Attached is the one-way script I use for my backups. It uses hard links to keep different versions (day/week, etc...).
It does not answer your question at all, but may be useful for some TLUG users... Alternatively, you may use it both ways,
it would help you: Just remove the year/month/week/days as required.
--
2 + 2 = 5, for very large values of 2.
Attachment: sync-br.sh
Description: Bourne shell script
- Follow-Ups:
- Re: [tlug] Run rsync based on time difference between local file and server file
- From: Charles Muller
- References:
- [tlug] Run rsync based on time difference between local file and server file
- From: Charles Muller
- Re: [tlug] Run rsync based on time difference between local file and server file
- From: Bruno Raoult
- Re: [tlug] Run rsync based on time difference between local file and server file
- From: Raymond Wan
- Re: [tlug] Run rsync based on time difference between local file and server file
- From: S Gibson
- Re: [tlug] Run rsync based on time difference between local file and server file
- From: Charles Muller
Home | Main Index | Thread Index
- Prev by Date: Re: [tlug] Run rsync based on time difference between local file and server file
- Next by Date: Re: [tlug] Run rsync based on time difference between local file and server file
- Previous by thread: Re: [tlug] Run rsync based on time difference between local file and server file
- Next by thread: Re: [tlug] Run rsync based on time difference between local file and server file
- Index(es):
Home Page Mailing List Linux and Japan TLUG Members Links