Backup scripts
Kevin Korb
kmk at sanitarium.net
Thu Sep 4 15:40:12 MDT 2014
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Just to show you what rsync snapshots should look like here is a
really quick and dirty script that will make a complete backup then a
snapshot using most of the information from your scripts:
http://dpaste.com/27V2WAF
Note that it just makes 2 backups. If you run it again it will make
another full and another snapshot with a 5 minute pause in between and
there is no error handling so please only consider this a very basic
example.
On 09/04/2014 05:21 PM, Kevin Korb wrote:
> Yes, you have different scripts now at least. But I still don't
> see any snapshotting. The only difference in these is that the
> "full" one rsyncs to a date+time stamped directory while the
> "snapshot" one rsyncs to a directory named snapshot. As far as I
> can tell both will be a complete copy with no relationship to the
> other.
>
> On 09/04/2014 05:17 PM, Chris wrote:
>> On Thu, 2014-09-04 at 17:00 -0400, Kevin Korb wrote:
>>> Do you actually have any snapshots currently? From the
>>> scripts you posted it seems to just be rsyncing to the same dir
>>> every run and only claiming to be making snapshots. If you do
>>> have snapshots now then something else is happening in addition
>>> to this script.
>
>> It was pointed out to me in a direct message that I had
>> inadvertently posted the same scripts (full backup) in pastebin.
>> Here are the correct one.
>
>> Full http://pastebin.com/dEk7kBip
>
>> Snapshot http://pastebin.com/H7SuABN1
>
>>>
>>> On 09/04/2014 04:58 PM, Chris wrote:
>>>> On Thu, 2014-09-04 at 12:46 -0400, Kevin Korb wrote:
>>>>> The scripts you posted look the same to me. And I don't
>>>>> see any form of snapshotting. The $NOW variable is set and
>>>>> is echoed but it is never actually used. For an rsync
>>>>> snapshot I would expect to see either rsync --link-dest or
>>>>> a cp -al depending on the age of the script.
>>>>>
>>>>> The only reason to need two scripts would be because the
>>>>> snapshot would need 3 dirs to work with (the source, the
>>>>> target, and the previous backup) but that could also be
>>>>> handled with 1 script and a simple existing check.
>>>>>
>>>>> On 09/04/2014 12:30 PM, Chris wrote:
>>>>>> I have two scripts that a kind soul on this list wrote
>>>>>> for me over 4yrs ago. I got to looking at them the other
>>>>>> day because my old box crashed and had to build a new one
>>>>>> also got a new backup USB drive since I'm still copying
>>>>>> over things from the old one. The first one is for a
>>>>>> full backup:
>>>>>>
>>>>>> http://pastebin.com/XF6Zm42A
>>>>>>
>>>>>> Works great, does exactly what it's supposed to do. The
>>>>>> second is for a 'snapshot' which is where I get a bit
>>>>>> confused. I would think that a 'snapshot' would be just
>>>>>> the changed files either since the last full backup or
>>>>>> since the last 'snapshot' the night before. It seems
>>>>>> though that it's actually the same as a full backup. I
>>>>>> don't profess to be a script person so I have no idea if
>>>>>> it's doing what it should or something needs to be
>>>>>> changed. Below is the 2nd script:
>>>>>>
>>>>>> http://pastebin.com/MkBzJnux
>>>>>>
>>>>>> Any advice would be appreciated.
>>>>>>
>>>>>> Chris
>>>>>>
>>>>>
>>>> Thanks Kevin, I guess for now I'll leave them as they are
>>>> until I can get smart on scripting.
>>>>
>>>> Chris
>>>>
>>>
>
>
>
>
- --
~*-,._.,-*~'`^`'~*-,._.,-*~'`^`'~*-,._.,-*~'`^`'~*-,._.,-*~'`^`'~*-,._.,-*~
Kevin Korb Phone: (407) 252-6853
Systems Administrator Internet:
FutureQuest, Inc. Kevin at FutureQuest.net (work)
Orlando, Florida kmk at sanitarium.net (personal)
Web page: http://www.sanitarium.net/
PGP public key available on web site.
~*-,._.,-*~'`^`'~*-,._.,-*~'`^`'~*-,._.,-*~'`^`'~*-,._.,-*~'`^`'~*-,._.,-*~
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2
iEYEARECAAYFAlQI3DwACgkQVKC1jlbQAQdSLQCfYVUB1J++FH7JfSkyP3YGvQVV
YpcAoNxTlnRVadjI5Ohi/LSMsJbEPLJu
=H01T
-----END PGP SIGNATURE-----
More information about the rsync
mailing list