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:
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:
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:
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!!
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.
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!
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.
|All times are GMT -5. The time now is 08:39 AM.|