Jump to content

Best practices for rsync?


tucansam

Recommended Posts

I am just now learning how to get rsync working. 

 

I have a primary server that has several users and user shares based on those usernames.  Family's "My Documents" folders from various machines in the house redirect to said user shares.

 

I am planning on setting up my backup server identically in terms of users and shares.  My plan is for my primary server to rsync data to the backup server, say weekly.  Any failure of the primary would be assumed to be catastrophic enough to require me to change the IP address of the backup server to the primary's, and essentially become a failover server, while I work the issue on the primary.  I hope this makes sense the way I wrote it.

 

I'm wondering if this is a solid plan.

 

I'm also wondering if I rsync data as root (or any other user for that matter) either via a cron job or directly from the command line, will permissions be copied?  Or will they be inherited?  In other words, if "root" runs the rsync command and copies three users' files to the backup server, will root then own those files?  Or will users be able to access their data on the backup server without issue?

 

I would actually just like to keep it simply and have one share, called "backup," on my backup server, and dump all user share folders there... But I'm thinking this would end up causing me a lot more work down the road, should I ever have to recover the files, or bring up the backup in place of the primary.

 

Comments and advice welcome.

 

Thanks.

Link to comment

A couple of comments ...

 

If I understand this correctly, the primary server is the main storage for your users -- not a backup.  If that's the case, why are you only planning for weekly backups??  The process works just fine whether it's weekly, daily, or even hourly.  I'd think a daily backup is more appropriate.

 

As for the permissions -- I'm not sure whether these would transfer or not, but my gut feel is that they would not.  I presume UnRAID stores these in the flash configuration data, so simply copying all the data isn't going to change this.  You could, of course, set up the same users/permissions on the backup server and copy everything to matching shares.    But I'd think a single "Backups" share with all the data organized as you like would be fine.  It's a BACKUP -- right?  So you don't really want to run from it anyway;  you want to use it to restore the data to the primary system as needed.

 

Link to comment

A couple of comments ...

 

If I understand this correctly, the primary server is the main storage for your users -- not a backup.  If that's the case, why are you only planning for weekly backups??  The process works just fine whether it's weekly, daily, or even hourly.  I'd think a daily backup is more appropriate.

 

As for the permissions -- I'm not sure whether these would transfer or not, but my gut feel is that they would not.  I presume UnRAID stores these in the flash configuration data, so simply copying all the data isn't going to change this.  You could, of course, set up the same users/permissions on the backup server and copy everything to matching shares.    But I'd think a single "Backups" share with all the data organized as you like would be fine.  It's a BACKUP -- right?  So you don't really want to run from it anyway;  you want to use it to restore the data to the primary system as needed.

rsync has the ability to match the "file" and "directory" permissions, you just need to invoke it with the correct options.  See the rsync manual page for all the options (there are many possible)  The SAMBA user permissions would have t be configured on each server independently.
Link to comment

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...