Re: [rdiff-backup-users] Please help getting my backups running.
Hi Gary Are you running rdiff-backup as root? Even if you are, backing up mysql databases needs some extra work to ensure that you get a consistent backup. For my linux machines I have mysql databases (and all my data) on LVM volumes, so I briefly lock the mysql server, take a snapshot of the volume (which happens quickly) and unlock the mysql server, and then I can take a backup from the snapshot: # ... simplified code clip ... MYVG="myvg" # name of LVM volume group MYLV="mylv" # name of LVM logical volume # lock mysql, create snapshot, unlock mysql mysql --execute="FLUSH TABLES WITH READ LOCK;" lvcreate -L528M -s -n "$MYLV-snap" "/dev/$MYVG/$MYLV" mysql --execute="UNLOCK TABLES;" # mount snapshot mkdir -p "/mnt/$MYLV-snap" mount "/dev/$MYVG/$MYLV-snap" "/mnt/$MYLV-snap" # backup $MYLV-snap rdiff-backup "/mnt/$MYLV-snap" ... # unmount and delete snapshot umount "/mnt/$MYLV-snap" rm -r "/mnt/$MYLV-snap" lvremove -f "/dev/$MYVG/$MYLV-snap" Without LVM you can't use snapshots, but you could lock the mysql databases and then run rdiff-backup and unlock afterwards. But the mysql databases would remain locked while the rdiff-backup operation is running - which may not be ideal. If you google 'rdiff-backup mysql' you will see a few other possible ways to backup mysql databases (e.g. using mysqldump). BTW, I find it very strange that no Linux filesystems have built-in stable snapshot support except by putting them on top of LVM, which is usually a bespoke configuration - Windows has the advantage here. Dominic On 06/11/2012 14:26, Gary Rickert wrote: Hello again Dominic, One more quick (I hope) question you may have an idea of how to resolve. I am trying to rdiff- the mysql .ibd's, and I get a permissions error. I have tried adding my rdiff user to the mysql group, and was already in sudo, but that did not resolve. The error I am receiving follows: Exception '[Errno 13] Permission denied: '/var/lib/mysql/PFA_production/*.ibd'' raised of class 'exceptions.OSError': File "/usr/lib64/python2.4/site-packages/rdiff_backup/Main.py", line 304, in error_check_Main try: Main(arglist) File "/usr/lib64/python2.4/site-packages/rdiff_backup/Main.py", line 321, in Main rps = map(SetConnections.cmdpair2rp, cmdpairs) File "/usr/lib64/python2.4/site-packages/rdiff_backup/SetConnections.py", line 78, in cmdpair2rp return rpath.RPath(conn, filename).normalize() File "/usr/lib64/python2.4/site-packages/rdiff_backup/rpath.py", line 884, in __init__ else: self.setdata() File "/usr/lib64/python2.4/site-packages/rdiff_backup/rpath.py", line 908, in setdata self.data = ""> File "/usr/lib64/python2.4/site-packages/rdiff_backup/connection.py", line 450, in __call__ return apply(self.connection.reval, (self.name,) + args) File "/usr/lib64/python2.4/site-packages/rdiff_backup/connection.py", line 370, in reval if isinstance(result, Exception): raise result Traceback (most recent call last): File "/usr/bin/rdiff-backup", line 30, in ? rdiff_backup.Main.error_check_Main(sys.argv[1:]) File "/usr/lib64/python2.4/site-packages/rdiff_backup/Main.py", line 304, in error_check_Main try: Main(arglist) File "/usr/lib64/python2.4/site-packages/rdiff_backup/Main.py", line 321, in Main rps = map(SetConnections.cmdpair2rp, cmdpairs) File "/usr/lib64/python2.4/site-packages/rdiff_backup/SetConnections.py", line 78, in cmdpair2rp return rpath.RPath(conn, filename).normalize() File "/usr/lib64/python2.4/site-packages/rdiff_backup/rpath.py", line 884, in __init__ else: self.setdata() File "/usr/lib64/python2.4/site-packages/rdiff_backup/rpath.py", line 908, in setdata self.data = ""> File "/usr/lib64/python2.4/site-packages/rdiff_backup/connection.py", line 450, in __call__ return apply(self.connection.reval, (self.name,) + args) File "/usr/lib64/python2.4/site-packages/rdiff_backup/connection.py", line 370, in reval if isinstance(result, Exception): raise result OSError: [Errno 13] Permission denied: '/var/lib/mysql/PFA_production/*.ibd' Fatal Error: Lost connection to the remote system On Fri, Nov 2, 2012 at 10:48 AM, Dominic Raferd domi...@timedicer.co.uk wrote: Well Gary I'm glad you succeeded in the end, and pleased to be of service. Yes normally the build location is /usr/src (absolute location) but you seemed to be using ./usr/src that is why I suggested you stick with that. If
Re: [rdiff-backup-users] Please help getting my backups running.
Well Gary I'm glad you succeeded in the end, and pleased to be of service. Yes normally the build location is /usr/src (absolute location) but you seemed to be using ./usr/src that is why I suggested you stick with that. If it has worked for you with /usr/src then that's better IMHO. I have now uploaded my rdiff-backup installer program rdiff-backup-install.sh to the web - help and download page at http://www.timedicer.co.uk/programs/help/rdiff-backup-install.sh. I've tweaked and renumbered it v0.3. If you use it again please use the latest version from there just so that I can check it is bug-free. Now that you have rdiff-backup working you might want to install rdiffweb which provides a web interface for retrieving files from the rdiff-backup server; install program is at http://www.timedicer.co.uk/programs/help/rdiffweb-install.sh. Regards, Dominic -- TimeDicer: Free File Recovery from Whenever On 02/11/2012 13:50, Gary Rickert wrote: Well Dominic, I sure hope you have had as much fun as I have:) All kidding aside, it looks like this script did it. I installed on my backup system, ran and got the version mis-match message, as expected. Ran rdiff-backup-install.sh on my other system, ran and all again looks OK. Thank you, thank you. So, what was the challenge? I will be doing a bunch more testing/bench-marking again in a few days, but I have some catching up to do after spending most of the last week emersed in this. I haven't looked in detail at the following install output, or tried to figure out the install script, but I believe the destination address in the install command line (/usr/src) should be absolute, not relative. y/n? My hope is that you don't hear from me again, but hope I haven't worn out my welcome if I do have more issues. It is not often that I see this level of responsiveness, even from paid vendors. Thanks again Gary ** root ~/install#./rdiff-backup-install.sh 1.2.8 /usr/src rdiff-backup-install.sh v0.2 [02 Nov 12] by Dominic (-h for help) === Searching for librsync.so*: /usr/lib Searching for Python.h: /usr/include/python2.4/Python.h Download rdiff-backup-1.2.8.tar.gz [y/-]: y Untar the rdiff-backup-1.2.8.tar.gz [y/-]: Build the downloaded program [y/-]: y running build ** On Fri, Nov 2, 2012 at 3:30 AM, Dominic Raferd domi...@timedicer.co.uk wrote: Here is a further-improved version of my script, and hopefully it can now use yum to install any missing dependencies. Notice that its name has changed to rdiff-backup-install.sh (i.e. with '.sh' added at the end). Try this (v0.2) instead of the one I sent a couple of hours ago. Dominic On 02/11/2012 00:50, Gary Rickert wrote: I hope "without any warranties" doesn't mean without assistance:} When I run the script I get: root ~/install/rdiff-backup-1.2.8 # installrdiff -pnq 1.2.8 /opt Unable to locate librsync.a. Please install librsync-dev and try again. root ~/install/rdiff-backup-1.2.8 # installrdiff -pnq rdiff-backup-1.2.8 /opt Unable to locate librsync.a. Please install librsync-dev and try again. The first thing I noticed was the package name installed: Package librsync-devel-0.9.7-13.el5.x86_64 already installed and latest version Package librsync-devel-0.9.7-13.el5.i386 already installed and latest version Name : librsync Arch : x86_64 Version : 0.9.7 Release : 13.el5 Hope this search may help: ./root/install/rdiff-backup-1.2.8/build/lib.linux-x86_64-2.4/rdiff_backup/librsync.py ./root/install/rdiff-backup-1.2.8/rdiff_backup/librsync.py ./usr/lib64/librsync.so ./usr/lib64/librsync.so.1.0.2 ./usr/lib64/librsync.so.1 ./usr/share/man/man3/librsync.3.gz ./usr/share/doc/librsync-0.9.7 ./usr/include/librsync-config.h ./usr/include/librsync.h
Re: [rdiff-backup-users] Please help getting my backups running.
On Wed, 31 Oct 2012 17:26:06 + Dominic Raferd domi...@timedicer.co.uk wrote: You only need the --remote-schema because you are connecting to a non-standard port, the normal connection assumes tcp port 22; rdiff-backup does not have a -p option but using remote-schema in this way achieves the same thing. Just to add, the --remote-schema option could be avoided if you add a Host definition to ~/.ssh/config with the appropriate port setting, e.g.: Host foo.example.com Port 1234 Then you can just use that hostname, and it should Just Work, with no need to mess with --remote-schema, or with the -p option when using ssh directly). -- David Precious (bigpresh) dav...@preshweb.co.uk http://www.preshweb.co.uk/ www.preshweb.co.uk/twitter www.preshweb.co.uk/linkedinwww.preshweb.co.uk/facebook www.preshweb.co.uk/cpanwww.preshweb.co.uk/github ___ rdiff-backup-users mailing list at rdiff-backup-users@nongnu.org https://lists.nongnu.org/mailman/listinfo/rdiff-backup-users Wiki URL: http://rdiff-backup.solutionsfirst.com.au/index.php/RdiffBackupWiki
[rdiff-backup-users] Please help getting my backups running.
I have spent the last week googling to figure this out but have failed. I have 2 servers, what I am going to call client, the system that will back up some directories on the server. I can ssh w/ no password by both client-root user and clientrdiffbackup and connect to a user with full sudo priveledges. The info following shows What, client, server. uname -r 3.4.2-x86_64-linode25 3.0.18-x86_64-linode24 yum info rdiff-backup Installed Packages Installed Packages Name : rdiff-backup Name : rdiff-backup Arch : x86_64 Arch : x86_64 Version: 1.0.5 Version: 1.0.5 Release: 2.el5Release: 2.el5 yum info fuse-sshfs Version: 2.4Version: 2.4 Users root and CLIENTrdiffSERVERrdiff ssh-copy-id -i /home/clientrdiff/.ssh/id_rsa.pub serverrd...@server.server.com as both root and clientrdiff returns ssh: connect to host server.server.com port 22: Connection refused If I add -p or use the Host from config I get: /usr/bin/ssh-copy-id: ERROR: No identities found /etc/fstabsshfs#ser...@server.com:/home/serverrdiff/ToBeBackedUp /home/clientrdiff/mnt/server.com:/home/clientrdiff/ToBeBackedUp fuse user,noauto,ro 0 0 mount /home/clientrdiff/mnt/server.server.com:/home/serverrdiff/ToBeBackedUp returns: mount: can't find /home/clientrdiff/mnt/ser...@server.com:/home/serverrdiff/ToBeBackedUp in /etc/fstab or /etc/mtab Same symptom when if fstab and command is configured to use root. This is what I hope is salient, but I will be most happy to answer any questions. ___ rdiff-backup-users mailing list at rdiff-backup-users@nongnu.org https://lists.nongnu.org/mailman/listinfo/rdiff-backup-users Wiki URL: http://rdiff-backup.solutionsfirst.com.au/index.php/RdiffBackupWiki