LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Software (https://www.linuxquestions.org/questions/linux-software-2/)
-   -   rsync backup system (https://www.linuxquestions.org/questions/linux-software-2/rsync-backup-system-473540/)

baronsam 08-13-2006 02:35 PM

rsync backup system
 
Hello--

I'm trying to backup the important files on my main server to a backup server.
I've established that using rsync might be a good way to do this.
I've been looking at rsback http://www.pollux.franken.de/hjb/rsback/ for a front-end for making rotating backups.

But so far I'm stuck with rsync. I keep getting "read-only filesystem" errors, just running the command :

rsync -ave "ssh -l root" /home root@192.168.0.6:/home/slm/backup_yoruban_home/

I have read that this might be due to no having read-only = no in the rsyncd.conf, but I don't have one as I'm not running rsync daemonized.
I can't get a clear picture of the pros and cons of running rsync daemonized, and whether or not it would be adapted to my needs.

Any help would be appreciated,

Thanks,

--Sam

IBall 08-14-2006 08:32 AM

Can you post the exact error here please.

It is possible you are trying to write to a disk that is full, or mounted read only. Check the fstab on the destination machine.

Rsync must also be installed on both the Source and Destination machines for rsync to work. Obviously, if you are using ssh to connect, the destination must have a SSH server configured and accepting connections on port 22.

I can't see anything wrong with your command though, but check the man page for rsync to find out any other options that may be useful.

I hope this helps
--Ian

baronsam 08-14-2006 06:06 PM

Hello Ian,

Thank you very much for answering.
There must be something seriously wrong with that machine, because not it can't get past a grub prompt.
At this point I'd settle for being able to make a one-time backup out to a network share, but rsync won't copy most of the files, I get "operation not permitted".

Is there any way to force rsync to backup all the files ?

I'm using rsync -av /home /mnt/usb80/yoruban_backup/

and getting : rsync: chown "/mnt/usb80/yoruban_backup/home/vpopmail/domains/yoruban.dyndns.org/testmailing/gothrough/subscribers" failed: Operation not permitted (1)
rsync: chown "/mnt/usb80/yoruban_backup/home/vpopmail/domains/yoruban.dyndns.org/testmailing/mod" failed: Operation not permitted (1)
rsync: chown "/mnt/usb80/yoruban_backup/home/vpopmail/domains/yoruban.dyndns.org/testmailing/mod/accepted" failed: Operation not permitted (1)
rsync: chown "/mnt/usb80/yoruban_backup/home/vpopmail/domains/yoruban.dyndns.org/testmailing/mod/pending" failed: Operation not permitted (1)
rsync: chown "/mnt/usb80/yoruban_backup/home/vpopmail/domains/yoruban.dyndns.org/testmailing/mod/rejected" failed: Operation not permitted (1)
rsync: chown "/mnt/usb80/yoruban_backup/home/vpopmail/domains/yoruban.dyndns.org/testmailing/mod/subscribers" failed: Operation not permitted (1)
rsync: chown "/mnt/usb80/yoruban_backup/home/vpopmail/domains/yoruban.dyndns.org/testmailing/subscribers" failed: Operation not permitted (1)
rsync: chown "/mnt/usb80/yoruban_backup/home/vpopmail/domains/yoruban.dyndns.org/testmailing/text" failed: Operation not permitted (1)
rsync: chown "/mnt/usb80/yoruban_backup/home/vpopmail/etc" failed: Operation not permitted (1)
rsync: chown "/mnt/usb80/yoruban_backup/home/vpopmail/include" failed: Operation not permitted (1)
rsync: chown "/mnt/usb80/yoruban_backup/home/vpopmail/lock" failed: Operation not permitted (1)
rsync: chown "/mnt/usb80/yoruban_backup/home/zebolue" failed: Operation not permitted (1)

(excerpt)

Thanks,

--Sam

IBall 08-15-2006 03:05 AM

Hummmm.
Is the that you are trying to backup to up and running? If it is stuck at the GRUB> prompt, then it isn't.

You won't be able to rsync to it until the remote machine is running correctly.

--Ian

baronsam 08-15-2006 12:16 PM

I'm sorry I wasn't very clear.
Those last error messages I posted are just trying to copy the files to a usb drive.
I can't even get that to work correctly, as you can see, and I'd really like to solve it.

Thanks,

--Sam

IBall 08-15-2006 08:19 PM

Can you try copying the files directly to the USB stick, using the cp command? If not, check that the USB stick is not being mounted readonly. Enter the command "mount", and you can see what devices are mounted where, and if they are readonly or read-write.

I am not sure if rsync can be used locally, or maybe some extra switches are needed. See the man pages for this.

--Ian

baronsam 08-15-2006 11:21 PM

I tried cp, gives a lot of errors.
rsync gets some of the files, not all, so I guess the usb disk is getting mounted rw.
I've been looking for the rsync switches, but can't find anything...
stuck...

--Sam

shawnbishop 08-16-2006 12:52 AM

Good Day

I have had this problem before, the USB drive is mounted read only and wasnt formatted as the correct file system

## format the drive first

mkfs.ext3 -b 4096 /dev/usbdrive

## then try this rsync command

rsync -azrpog --delete /source/files/ /destination/drive

Regards

cheeby 08-23-2006 04:39 PM

This worked for me, too, on a Seagate 5 GB external device. I made sure the drive was not mounted, then ran

Code:

bash # mkfs.resiserfs -b 4096 /dev/sda1
mounted the drive, created a backup dir, cd'd to it and executed my rsync command:

Code:

bash # rsync -avzr --rsh=ssh my.remotehost.com/remote/dir/* .

All errors disappeared, and I can now carry my web and db server around in my pocket. Thanks.

pgreenwood 05-22-2010 10:57 AM

Quote:

Originally Posted by shawnbishop (Post 2381558)
Good Day

I have had this problem before, the USB drive is mounted read only and wasnt formatted as the correct file system

## format the drive first

mkfs.ext3 -b 4096 /dev/usbdrive

## then try this rsync command

rsync -azrpog --delete /source/files/ /destination/drive

Regards

I haven't implemented this solution yet but I'm SURE it will solve my problem. Thank you all!


All times are GMT -5. The time now is 02:02 PM.