LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 01-24-2009, 07:54 PM   #1
lpallard
Senior Member
 
Registered: Nov 2008
Posts: 1,045

Rep: Reputation: Disabled
Post Using rsnapshot with sshfs to backup


Hello! I am trying to backup my laptop to my server on my private network and I have a few problems.... Here's my configuration:

I have Slackware 12.2 on both machines, with ssh on both, and rsnapshot, fuse, and sshfs on my laptop.

My strategy is very simple:

1-I created a crontab (root) to automate the operations;
2-Crontab call the /usr/bin/rsnapshot script with "weekly" argument;
3-rsnapsnot script includes both pre_exec and post_exec commands.

Pre_exec is a script in /usr/bin/ and it's purpose is to simply mount a remote filesystem (on my server) to a local mountpoint (on my laptop, in a different partition than the snapshot). Here's the content of my preexec script:

Code:
sshfs username@AAA.BBB.DDD.DDD:/mnt/storage /mnt/storage/backup
And it works perfectly....

Post_exec is also a script in /usr/bin/ and it's purpose is to simply un-mount the remote filesystem from the local mountpoint. Here's the content of my postexec script:

Code:
fusermount -u /mnt/storage/backup
And it also works perfectly....

Of course, the problem is in between, with the rsnapshot script. I experience various problems and here's some of them (what I get in terminal):

rsync: failed to set times on "/mnt/storage/backup/weekly.0/localhost/home/username/.DCOPserver_laptop_:0": No such file or directory(2)
rsync: failed to set times on "/mnt/storage/backup/weekly.0/localhost/home/username/.googleearth/instance-running-lock": No such file or directory (2)
rsync: writefd_unbuffered failed to write 4 bytes [sender]: Broken pipe (32)
rsync: connection unexpectedly closed (1389 bytes received so far) [sender]
rsync error: error in rsync protocol data stream (code 12) at io.c(632) [sender=3.0.4]
----------------------------------------------------------------------------
rsnapshot encountered an error! The program was invoked with these options:
/usr/bin/rsnapshot weekly
----------------------------------------------------------------------------
ERROR: /usr/bin/rsync returned 12 while processing /home/

Whats wrong???? I am confused!!

Thanks for any feedback!!

I forgot to explain my motivation behind this:
No need to explain why I want to backup my laptop, but the thing is, I haven't found any websites/references that explains how to push your backup TO a server, or a network shared folder.... rsnapshot seems to be very good to backup remote machines TO the local machine, but the opposite doesn't seems so obvious. I dont want to backup my server into my laptop, but the opposite. yes I could have done the same stuff on my server so rsnapshot remotely backup my laptop to my server, but I dont use/care as much about my server, and I dont like to depend on a remote machine to auto-backup my laptop. Plus, my server is in the basement... Obviously, I can backup my data on the first laptop HDD to the second HDD, but what is the point? Also, I could use a USB HDD to store the snapshot, but I would require at least a 500GB USB HDD and I prefer to use my gigabit network with my 4TB of storage space in my server... Any improvements/ideas/comments are more than welcome!!

Last edited by lpallard; 01-24-2009 at 08:06 PM.
 
Old 01-26-2009, 10:39 AM   #2
pentode
Member
 
Registered: Dec 2005
Location: Oregon
Distribution: Debian Testing
Posts: 488

Rep: Reputation: 38
rsnapshot is designed to backup TO the system it is running on. There are no provisions to push the data the other way. It's just a fundamental design feature of the program. This question comes up pretty frequently on the rsnapshot mailing list - you might want to search the archives. I believe it is also covered in the documenation.

All of your errors are rsync errors indicating perhaps your paths are incorrect or there is a permissions problem.

It's probably possible to do what you are trying to do with rsnapshot, but I think it would take a good deal of work.
 
1 members found this post helpful.
Old 02-12-2009, 11:42 AM   #3
lpallard
Senior Member
 
Registered: Nov 2008
Posts: 1,045

Original Poster
Rep: Reputation: Disabled
Wink Makes perfect sense!

What you said is perfectly right, but I was wondering if there is any alternative to rsnapshot in the opensource environment to backup a computer??

Also if I backup my laptop, should I backup by partitions, by physical disks or by folder/files??? I would go over all the documentation, but Its painfully time consuming and if somebody would give me some indication I would get started onthe documentation. My background is windows and I used norton ghost in the past to clone a HDD, but this technique makes a perfect copy bit by bit, sector by sector of the base HDD... I dunno if its the best strategy to backup a computer... obviously, I care a lot more about my personal files than the system files, and do not care at all about the temp files and all the logs/cache data.... However, If I can backup the whole machine including of course my personal files and all the system files (so I wont have to reinstall slackware and everything which takes a LOT of time) that would be great! Please share your backup strategy if you want, that would be nice!
THanks!!
 
Old 08-29-2012, 10:41 AM   #4
headmastersquall
LQ Newbie
 
Registered: Aug 2012
Posts: 2

Rep: Reputation: Disabled
Backup Solution

I have written a backup program called caatinga that will "push" backups to any mounted media. It works similar to rsnapshot in the fact that multiple snapshots are preserved and you have access to past versions of files. Hard links are also used so backups beyond the first execute very quickly and consume a minimal amount of space. It can also be configured to backup only your home directory instead of a full system backup as mentioned in your post.

Backups are intended to be stored on local media, such as an internal backup drive or an external usb drive. However, using sshfs as you show in your original post allows you to create backups on a remote system. I hope this helps.

The project can be found at the link below. Please note that in order to use the sshfs for remote backups, version 1.1.0 or newer must be used, or get the latest code by cloning the repository.

https://github.com/headmastersquall/caatinga
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Rsnapshot backup of Windows client - name resolution problem pentode Linux - Server 5 12-05-2008 04:07 PM
Rsnapshot and Backup Strategy Woodsman Slackware 2 04-28-2008 10:48 PM
Backups with rsnapshot jeremy LQ Articles Discussion 0 07-30-2007 12:58 PM
rsync and rsnapshot madman100 Linux - Newbie 4 10-10-2006 09:33 AM
Using rsnapshot to make a system backup Transition Slackware 1 03-21-2005 09:23 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

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

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration