FAQ
I need to setup a CentOS box offsite to have a series of files replicated to it.
My problem is this machine won't have Samba on it but I need to replicate the
hierarchy in question in such a manner that I can restore from it and retain
file system permissions.

That's where I am stumped, anyone got any ideas?

Thanks,
jlc

Search Discussions

  • Robert Heller at May 29, 2009 at 9:19 pm

    At Fri, 29 May 2009 21:06:40 +0000 CentOS mailing list wrote:
    I need to setup a CentOS box offsite to have a series of files replicated to it.
    My problem is this machine won't have Samba on it but I need to replicate the
    hierarchy in question in such a manner that I can restore from it and retain
    file system permissions.

    That's where I am stumped, anyone got any ideas?
    Get a port of GNU Tar for MS-Windows and install it and a SSH client on the
    Windows Machines. Use GNU Tar + SSH to ship the files. GNU Tar will
    preserve the file permissions. Once the tar files land on the remote
    (offsite box), unpack the tar file(s) to the local disk.

    For the more adventurous, install Cygwin on the Windows machinesand
    then you can fire up a bash shell and do:

    tar czvf - -C local-path file ... | ssh remotebox tar xzvf - -C path-on-remote-box

    To restore:

    ssh remotebox tar czvf - -C path-on-remote-box .|tar xzvf - -C local-path

    Thanks,
    jlc
    _______________________________________________
    CentOS mailing list
    CentOS at centos.org
    http://lists.centos.org/mailman/listinfo/centos
    --
    Robert Heller -- 978-544-6933
    Deepwoods Software -- Download the Model Railroad System
    http://www.deepsoft.com/ -- Binaries for Linux and MS-Windows
    heller at deepsoft.com -- http://www.deepsoft.com/ModelRailroadSystem/
  • Joseph L. Casale at May 29, 2009 at 9:33 pm

    Get a port of GNU Tar for MS-Windows and install it and a SSH client on the
    Windows Machines. Use GNU Tar + SSH to ship the files. GNU Tar will
    preserve the file permissions. Once the tar files land on the remote
    (offsite box), unpack the tar file(s) to the local disk.

    For the more adventurous, install Cygwin on the Windows machinesand
    then you can fire up a bash shell and do:

    tar czvf - -C local-path file ... | ssh remotebox tar xzvf - -C path-on-remote-box

    To restore:

    ssh remotebox tar czvf - -C path-on-remote-box .|tar xzvf - -C local-path
    Interesting,
    How I have been doing some files that don't need permissions is using VSS to snap
    an SQL and Exchange server (it flushes a consistent state to disc), the script then
    exposes the snap to a drive letter, and I rsync the files off the windows box to
    the CentOS DR server remotely. Only the delta gets transferred and works very nicely.

    Problem is now I need to do this where perms are important for a file server with
    ~400G of some few million files. I am not sure what you meant about untarring the
    files after they land on the centos box? Wouldn't the file then lose its permission
    metadata?

    The solution uses tools I am already using so it wouldn't be stretch to modify existing
    scripts, I am just not sure I follow you:)

    Thanks so much!
    jlc
  • Les Mikesell at May 29, 2009 at 9:42 pm

    Joseph L. Casale wrote:
    I need to setup a CentOS box offsite to have a series of files replicated to it.
    My problem is this machine won't have Samba on it but I need to replicate the
    hierarchy in question in such a manner that I can restore from it and retain
    file system permissions.

    That's where I am stumped, anyone got any ideas?
    Rsync over ssh is usually the best way to replicate files periodically.

    --
    Les Mikesell
    lesmikesell at gmail.com
  • Joseph L. Casale at May 29, 2009 at 9:47 pm
    Rsync over ssh is usually the best way to replicate files periodically.
    Yup, doing it this way already, just need to understand how to maintain
    NTFS perms...
  • Les Mikesell at May 29, 2009 at 10:13 pm

    Joseph L. Casale wrote:
    Rsync over ssh is usually the best way to replicate files periodically.
    Yup, doing it this way already, just need to understand how to maintain
    NTFS perms...
    I don't think it is possible to exactly match NTFS perms on a different
    filesystem. You could use ntbackup to a file - or if you can shut down
    for the copy, something like clonezilla would work, but you won't have
    the efficiency of rsync'ing the individual files.

    --
    Les Mikesell
    lesmikesell at gmail.com
  • John R Pierce at May 29, 2009 at 10:24 pm

    Joseph L. Casale wrote:
    I need to setup a CentOS box offsite to have a series of files replicated to it.
    My problem is this machine won't have Samba on it but I need to replicate the
    hierarchy in question in such a manner that I can restore from it and retain
    file system permissions.

    That's where I am stumped, anyone got any ideas?
    use ntbackup on the windows machine to create .bkp file, then copy that
    to the DR backup with scp or rsync or whatever. ntbackup can append
    incremental backups to the same .bkp file, which is sort of like a
    compressed tarball with more features and native windows file attributes
    (its not at all compatible with tar, its just structurely somewhat
    similar). ntbackup also uses VSS snapshots on NTFS volumes, so the
    backups are point-in-time consistent.
  • Joseph L. Casale at May 29, 2009 at 10:56 pm

    use ntbackup on the windows machine to create .bkp file, then copy that
    to the DR backup with scp or rsync or whatever.
    I looked at that initially, but the incremental was huge for some reason
    and the bandwidth needed over the link was more than we could provision
    for.

    File by file would actually work, rsyncing only what we need to. I don't
    know this was but that's how it played out in testing. This is definitely
    being a PITA for me but I am not being given enough cash to do this easily.

    Sigh...

    Roberts suggestion about using tar interests me, but I just read gnu tar wont
    do what I need, but Schily tar will. Not sure of there is a windows port.

    Thanks for all the suggestions guys!
    jlc
  • Scott Silva at May 29, 2009 at 11:10 pm

    on 5-29-2009 2:06 PM Joseph L. Casale spake the following:
    I need to setup a CentOS box offsite to have a series of files replicated to it.
    My problem is this machine won't have Samba on it but I need to replicate the
    hierarchy in question in such a manner that I can restore from it and retain
    file system permissions.

    That's where I am stumped, anyone got any ideas?

    Thanks,
    jlc
    http://setacl.sourceforge.net/



    -------------- next part --------------
    A non-text attachment was scrubbed...
    Name: signature.asc
    Type: application/pgp-signature
    Size: 258 bytes
    Desc: OpenPGP digital signature
    Url : http://lists.centos.org/pipermail/centos/attachments/20090529/494f610a/attachment.bin
  • Joseph L. Casale at May 29, 2009 at 11:49 pm
    Yeah, I thought of using the MS reskit utils as I have logon
    scripts which already make use of them and through those I see
    you can backup acls to a txt file but the thought of restoring
    some of the data and then selectively applying a backed up acl
    would be cumbersome :(

    This isn?t looking easy. I *could* setup Samba on te remote
    server and establish a vpn but I have to say all my experiences
    with Samba have been less than what I would consider, enterprisable
    and that could very well be my simple extreme lack of knowledge
    with it.

    Thanks!
    jlc
  • Ross Walker at May 30, 2009 at 4:22 am

    On May 29, 2009, at 7:49 PM, "Joseph L. Casale" wrote:

    http://setacl.sourceforge.net/
    Yeah, I thought of using the MS reskit utils as I have logon
    scripts which already make use of them and through those I see
    you can backup acls to a txt file but the thought of restoring
    some of the data and then selectively applying a backed up acl
    would be cumbersome :(

    This isn?t looking easy. I *could* setup Samba on te remote
    server and establish a vpn but I have to say all my experiences
    with Samba have been less than what I would consider, enterprisable
    and that could very well be my simple extreme lack of knowledge
    with it.
    I know it isn't CentOS related, but OpenSolaris has a CIFS server and
    ZFS has native support for Windows ACLs, maybe that will work?

    Otherwise you could use iSCSI as a possibility which would allow you
    to do block level incremental/differential backups with the right
    software package.

    Depends on connectivity and requirements.

    -Ross

Related Discussions

Discussion Navigation
viewthread | post
Discussion Overview
groupcentos @
categoriescentos
postedMay 29, '09 at 9:06p
activeMay 30, '09 at 4:22a
posts11
users6
websitecentos.org
irc#centos

People

Translate

site design / logo © 2022 Grokbase