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
At Fri, 29 May 2009 21:06:40 +0000 CentOS mailing list centos@centos.org 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@centos.org http://lists.centos.org/mailman/listinfo/centos
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
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.
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.
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.
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
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
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
On May 29, 2009, at 7:49 PM, "Joseph L. Casale" <JCasale@activenetwerx.com
wrote:
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