On 2020-06-30 19:35, backu...@kosowsky.org wrote:
Michael Stowe wrote at about 23:09:55 +0000 on Tuesday, June 30, 2020:
> On 2020-06-29 21:51, backu...@kosowsky.org wrote:
> > Over the years, many have asked and struggled with backing up
remote
> > Windows shares with shadow copies. Shadow copies are useful since
they
> > allow both the backup to be 'consistent' and allow for reading
files
> > that are otherwise 'busy' and unreadable when part of active
Windows
> > partitions.
> >
> > Various solutions (including one I proposed almost a decade ago)
use
> > additional scripts and hacks to create the shadow copy.
> > Such solutions are kludgy and require the maintenance of separate
> > scripts either on the server or client.
> >
> > I have written a combination of perl and bash code that can be
stored
> > in the host.pl configuration file that does everything you need to
> > automagically create shadow copies for each share (where possible)
> > with minimal to no special configuration in host.pl and nothing to
> > configure on the Windows client (other than having
cygwin+ssh+rsync
> > and an accessible account on your Windows client).
> >
> > The only thing you need to do is to set up the hash
> > Conf{ClientShareName2Path} to map share names to their
> > (unshadowed) Windows paths. The attached script will then set up
and
> > interpolate the appropriate shadow paths.
> >
> > It should just work...
> > Just cut-and-paste the attachment into your host.pl code for
Windows
> > clients.
> >
> > Note: I included a fair amount of debugging & error messages in
case
> > any shadows or links fail to get created or unwound.
>
> What ssh do you use?
I just use stock cygwin ssh & rsync.
> When I updated my server-side scripts to work with ssh as well as
the
> venerable winexe, and was alerted to this:
>
https://u2182357.ct.sendgrid.net/ls/click?upn=UlfI6r-2FmuicX-2BnC5-2BZ3I6n1L3gGqkO4CpkrIpm-2FMXVdh7clCIBIMiVaW-2Fu4zJf1mu24301LW0nUuAE3Gedwg9vUvdiSjYTlleQn605qsb0FRbW6N7V7wfRFUjfSABVFV0RoZJ-2FyEfjb4YYEr-2F8znrwZSnSJzHNGDagX1i-2B8oxVVwIZ-2B-2BI-2B7fMNzIKJC5kqSEW-2F9D0DtlKHitvY1YisbM5pu2luUF-2B-2BItSFT8NuOX9Vq2dCJdKdjvFvOyTyyHxp1wW32cXKbNHSuWQQmnAIy9oD35Wau2-2B7WszpGgfR0cY-2B0pevu2W-2B-2B6fJJEznZrhlRitkK4PIwEk6rpHv5pNEE3zE6plvEiSsBUAzjqpeaPD-2BxvaMsO6aQJ9CXFTtDn8dUS5m6iatIhO0OYIAr3rlIP8HOuM8UxphdnUS-2Bx3cno2jam0S-2B-2B5lEewh0xiHIFUJ6ol867CfD3znalR13b0QgQk4L2VHC3hqf6DGABwIsLeze9isvhCs7r1nk59mpMhuTky2t-2BRoH9Mdm1KhWkz0czqEeXpfbtZjuSwPZeYgTcqMM-3D_4d7_ukiVZyKkp5Cjvx76jsH50UVUlXkseXbKCRkPqSLeHuHGH3U7CETSxfS6wuOOBk00pkNGxGGLZoFxeZBePnNNfQwoEtLwJoSFE-2FLY1sVDBZbSrzu7m0AdClCUvxzYM7KNHA9ZIEYhwveViz3D0A1qxuZ0VdWwC2Z2fJVSIP9x42x5tUhxpcmHt-2FjoSKP46YtZux-2F159UIJgD7q6ONjcVYeYEQdVYxxGrBNusnkQIrUHReWk9DtR-2B30KsApgurmA19
I don't use winexe - it's also not particularly secure.
No, nor do I. But I do use the ssh that comes with Windows, which
required some special handling to get the permissions right. I don't
know if your script will work with it, but I can give it a whirl within
the week.
I pipe a server-side bash script onto ssh as part of the Dump Pre/Post
User Commands to setup and takedown the shadows.
Not sure why you would want to use a custom version of rsync when my
pretty simple scripts do all that with a lot more transparency to how
they are setup.
I think because it's just one binary (vsshadow not needed, nor anything
else)
Can you test out my script?
I'll give it a shot (see above)
I believe it's far simpler and cleaner than either:
- My old approach for WinXP (using a client-side triggered script,
rsyncd setup, dosdev, 'at' recursion to elevate privileges, etc.)
- Your version requiring win.exe
- Other versions requiring a custom/non-standard rsync
N.B.: my version works using ssh now, it doesn't require winexe
My version only requires a basic cygwin install with rsync/ssh and
basic linux utils plus built-in windows functions.
BTW, I still need to add back in the ability to dump all the acl's
(using subinacl) since rsync only syncs POSIX acls and I believe ntfs
has additional acl's.
In any case, my ultimate holy-grail is to be able to use BackupPC to
allow for
a full bare-metal restore by combining:
- Full VSS file backup
- Restore of all ACLs from a subinacl dump
- Anything else I may need to recreate the full NTFS filesystem for
windows (maybe disk signatures???)
I fully support this notion; NTFS has a lot of weirdness that doesn't
translate well to rsync, like junction points. Last time I tried these,
rsync would convert them to symlinks, and restore them as symlinks.
YMMV
_______________________________________________
BackupPC-users mailing list
BackupPC-users@lists.sourceforge.net
List: https://lists.sourceforge.net/lists/listinfo/backuppc-users
Wiki: http://backuppc.wiki.sourceforge.net
Project: http://backuppc.sourceforge.net/