Is there a howto/tutorial on backups/rsync that covers the use of hard and soft links?
Ashley M. Kirchner
ashley at pcraft.com
Wed Jan 23 09:32:10 MST 2013
Oh, absolutely my script has flaws in it. I will never claim anything I
create or use to not have any flaws. :)
The machines it runs on are strictly servers that rarely get shutdown
though. The only time that happens if if there's a power failure that
lasts longer than 30 minutes (which has only happened once in the last 20
years or so of us being in this building.) And it also e-mails me a
detailed log file after it's done, so if there was a failure, I'd see it by
morning and then I can trigger it again manually to get a good backup. Can
it be better, and aware of failed syncs? Absolutely.
On Wed, Jan 23, 2013 at 8:25 AM, Kevin Korb <kmk at sanitarium.net> wrote:
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
> I handle this by actually backing up to "backupname.incomplete". Once
> the backup is complete I then rename it to
> "backupname.yyyy-mm-dd.HH-MM-SS". That way all of the backups with
> date+time stamps in the name are completed backups and if a backup
> fails repeatedly that will not count multiple times against the number
> of backups I intend to keep.
> On 01/23/13 03:15, Voelker, Bernhard wrote:
> > Kevin Korb wrote:
> >> On 01/22/13 18:12, Kevin Korb wrote:
> >>> That is the old way that pre-dates --link-dest. Instead of cp
> >>> -al daily.02 daily.01 you can do a mkdir daily.01 then an rsync
> >>> ... --link-dest=../daily.02 daily.01
> >>> Rsync then doesn't need any --delete and you don't bother
> >>> making any hard links that will eventually be replaced. Plus
> >>> the linking happens while rsync is running so it is usually
> >>> much faster.
> >> Also, if you put dates and times in the file names instead of
> >> .01, .02, etc you don't have to do any mv's, you can easily tell
> >> when each backup was run, and ls can tell you which the newest
> >> and oldest are.
> > Please tell me if I'm wrong, but depending on the scenario, it has
> > one week point:
> > I'm using a similar script on some desktop PCs. The problem is,
> > that - due to the fact that it's a desktop PC - the backup can be
> > killed during a shutdown ... leaving the last backup uncomplete.
> > That's not a problem per se, but with the next backup, the missing
> > files are copied freshly from the source and thus exhausting
> > backup space. Therefore, the script I'm using rotates the snapshot
> > *after* a successful run of rsync.
> > Have a nice day, Berny
> - --
> 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.0.19 (GNU/Linux)
> Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/
> -----END PGP SIGNATURE-----
> Please use reply-all for most replies to avoid omitting the mailing list.
> To unsubscribe or change options:
> Before posting, read: http://www.catb.org/~esr/faqs/smart-questions.html
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the rsync