Community Forums
Connect with us on LinkedIn
Community Notice
+ Reply to Thread
Page 2 of 5 FirstFirst 1 2 3 4 ... LastLast
Results 16 to 30 of 65
  1. #16
    Member
    Join Date
    Oct 2002
    Posts
    751

    Default

    Is it possible with rsync to preserve user and group settings somehow if the target user is not root?

    I signed up for a remote backup plan and use rsync for the backups which works well.

    On top of that I would like to rsync certain directories, but every file I rsync is automatically set to the user/group on my backup location. I know this is caused because I'm not root on the target server, but I was wondering if it at all possible to preserve owner id in this case (without tarring everything)

    I've tried using --numeric-ids but that doesn't seem to work.

  2. #17
    Super Moderator This forum account has been confirmed by cPanel staff to represent a vendor. chirpy's Avatar
    Join Date
    Jun 2002
    Location
    Go on, have a guess
    Posts
    13,495

    Default

    What rsync qualifiers are you using? I would suggest that you use -a which should preserve UID/GID and permission settings.
    Jonathan Michaelson

    Need your cPanel servers secured and tuned?
    cPanel Server Configuration, Security, Recovery and Antivirus/AntiSpam Services
    Developers of the most effective (and free) Firewall & Security Solution for cPanel Servers - csf
    http://www.configserver.com

  3. #18
    Member
    Join Date
    Oct 2002
    Posts
    751

    Default

    I am using -a:
    sync --delete --stats -avz --numeric-ids -e ssh

    When I login (SCP) to the backup account all files have the username and groupname of the backup account user. The permissions are correct though.

    Does the following mean root on source or root on target?

    -o, --owner preserve owner (root only)

  4. #19
    Super Moderator This forum account has been confirmed by cPanel staff to represent a vendor. chirpy's Avatar
    Join Date
    Jun 2002
    Location
    Go on, have a guess
    Posts
    13,495

    Default

    Ah! I guess it's root on target, which you don't have. Looks like you're going to have to tar the files before rsync'ing them.
    Jonathan Michaelson

    Need your cPanel servers secured and tuned?
    cPanel Server Configuration, Security, Recovery and Antivirus/AntiSpam Services
    Developers of the most effective (and free) Firewall & Security Solution for cPanel Servers - csf
    http://www.configserver.com

  5. #20
    Member
    Join Date
    Mar 2003
    Posts
    83

    Default Response

    I've written my own C program that runs on a weekly basis and backups all accounts to another server independantly of cPanel - although it uses the "pkgacct" script from cpanel. It uses sftp and also has a load sensitive feature - if it senses server load above 4 it waits until it goes down again before proceeding with the next backup. Its been remote backing up accounts for over a year now and runs perfectly.

    I could modify this script and make it usable by anyone if there is demand for it. Is there demand for this? We would charge a small fee (since I'd have to mofidy and create a config file), say a few dollars. People interested in this? If so then please email me at sales@deasoft.com. I don't check these forums much so I probably won't be back here for a while - better to email me.

  6. #21
    Member
    Join Date
    Jun 2004
    Posts
    5

    Default rsync --delete

    Hi Chirpy

    The --delete command in rsycn line is to eliminate files that are in the remote backup but they aren´t in the /daily/backup ?

    Thanks,

    HD

  7. #22
    Super Moderator This forum account has been confirmed by cPanel staff to represent a vendor. chirpy's Avatar
    Join Date
    Jun 2002
    Location
    Go on, have a guess
    Posts
    13,495

    Default

    Yes, that's correct.
    Jonathan Michaelson

    Need your cPanel servers secured and tuned?
    cPanel Server Configuration, Security, Recovery and Antivirus/AntiSpam Services
    Developers of the most effective (and free) Firewall & Security Solution for cPanel Servers - csf
    http://www.configserver.com

  8. #23
    Member
    Join Date
    Jun 2004
    Posts
    5

    Default error with rsync

    Thanks for your response,

    some times i receive this error message, you know what they are ? The mentions of them on the Web are pretty skimpy.

    Error Msgs
    --------------------------------------------------------------
    rsync: writefd_unbuffered failed to write 9 bytes: phase "unknown": Broken pipe
    rsync error: error in rsync protocol data stream (code 12) at io.c(515)

    In other backup is :
    -----------------------------
    deflate on token returned 0 (21800 bytes left)
    rsync error: error in rsync protocol data stream (code 12) at token.c(288)

    Thanks

    HD.

  9. #24
    Member
    Join Date
    Jun 2004
    Posts
    5

    Default rsyncable backup

    Hi Chirpy,

    Seems that is a gzip issue, when there are large files, need to be a --rsyncable option, how i can modify this option ?

    Thanks,

    H.D.

  10. #25
    Super Moderator This forum account has been confirmed by cPanel staff to represent a vendor. chirpy's Avatar
    Join Date
    Jun 2002
    Location
    Go on, have a guess
    Posts
    13,495

    Default

    That's correct. The zipping option in rsync seems to be a bit flaky, so I don't actually use it anymore. Just drop the z from the command line that I mentioned earlier in the thread.
    Jonathan Michaelson

    Need your cPanel servers secured and tuned?
    cPanel Server Configuration, Security, Recovery and Antivirus/AntiSpam Services
    Developers of the most effective (and free) Firewall & Security Solution for cPanel Servers - csf
    http://www.configserver.com

  11. #26
    Member
    Join Date
    Jun 2004
    Posts
    5

    Default

    Use more cpu and memory without the -z option ? or is the same for the cpu an mem ?

    Thanks,

    HD.

  12. #27
    Super Moderator This forum account has been confirmed by cPanel staff to represent a vendor. chirpy's Avatar
    Join Date
    Jun 2002
    Location
    Go on, have a guess
    Posts
    13,495

    Default

    It's use less cpu and memory without the -z option, but will take up more bandwidth, though since the files are already gzipped it's not going to make that much difference. I dropped the -z not long after I originally posted that
    Jonathan Michaelson

    Need your cPanel servers secured and tuned?
    cPanel Server Configuration, Security, Recovery and Antivirus/AntiSpam Services
    Developers of the most effective (and free) Firewall & Security Solution for cPanel Servers - csf
    http://www.configserver.com

  13. #28
    Member
    Join Date
    Feb 2004
    Posts
    203

    Default

    I use this command:
    Code:
    rsync --delete --stats -vae --port=**** ssh ipremotehost:/root/mybackup/ /backup/mybackup/
    building file list ... link_stat ssh : No such file or directory


  14. #29
    Super Moderator This forum account has been confirmed by cPanel staff to represent a vendor. chirpy's Avatar
    Join Date
    Jun 2002
    Location
    Go on, have a guess
    Posts
    13,495

    Default

    If you're using a different SSH port:

    rsync --delete --stats -vae 'ssh -p xxxx' ipremotehost:/root/mybackup/ /backup/mybackup/
    Jonathan Michaelson

    Need your cPanel servers secured and tuned?
    cPanel Server Configuration, Security, Recovery and Antivirus/AntiSpam Services
    Developers of the most effective (and free) Firewall & Security Solution for cPanel Servers - csf
    http://www.configserver.com

  15. #30
    Member
    Join Date
    Feb 2004
    Posts
    203

    Default

    Wow chirpy, that work great!
    you're my guru

    Thank you

Similar Threads & Tags
Similar threads

  1. Replies: 0
    Last Post: 01-22-2010, 04:53 PM
  2. backup script
    By richenou in forum cPanel and WHM Discussions
    Replies: 2
    Last Post: 03-31-2008, 06:56 AM
  3. Backup Script
    By xrserver in forum cPanel and WHM Discussions
    Replies: 2
    Last Post: 02-26-2008, 11:00 AM
  4. Replies: 7
    Last Post: 10-29-2006, 04:40 PM
Linkedin       Facebook       Twitter       RSS       Flickr       YouTube