LinuxQuestions.org
Share your knowledge at the LQ Wiki.
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-12-2011, 06:20 AM   #1
zkab
Member
 
Registered: Dec 2007
Posts: 142

Rep: Reputation: 16
rsnapshot backups


I am going to use 'rsnapshot' to create backups of my local & remote computers. My intension is that I can use these backups to restore disk images when needed -> install Linux from scratch and then copy the subdirectories from 'rsnapshot' backup to the new Linux installation.
My question is ... what subdirectories should be excluded in the backup. Now I have following excluded ... but are they the right ones or have I missed something:

exclude /proc
exclude /lost+found
exclude /mnt
exclude /media
exclude /sys
exclude /home/lost+found
exclude /tmp
 
Old 01-13-2011, 05:00 PM   #2
kbp
Senior Member
 
Registered: Aug 2009
Posts: 3,790

Rep: Reputation: 653Reputation: 653Reputation: 653Reputation: 653Reputation: 653Reputation: 653
It depends on where you keep things - you can ignore /dev and possibly /lib, /lib64, /selinux. Assuming you only install things via package it may be quicker to list want you want - /etc, /home, /var/www etc

Another thought - you may break your package management and/or packages if you restore any of the system binaries over the top

Last edited by kbp; 01-13-2011 at 05:05 PM.
 
Old 01-17-2011, 11:24 AM   #3
zkab
Member
 
Registered: Dec 2007
Posts: 142

Original Poster
Rep: Reputation: 16
Some strange things happened with my 'rsnapshot'.
My config-file looks like follows:

$ cat /etc/rsnapshot_zkab.conf
# Config för ZKAB

config_version 1.2
snapshot_root /rsnapshot_backups/zkab/

cmd_cp /bin/cp
cmd_rm /bin/rm
cmd_rsync /usr/bin/rsync
cmd_ssh /usr/bin/ssh
cmd_logger /usr/bin/logger
cmd_du /usr/bin/du
cmd_rsnapshot_diff /usr/bin/rsnapshot-diff

linux_lvm_cmd_lvcreate /sbin/lvcreate
linux_lvm_cmd_lvremove /sbin/lvremove
linux_lvm_cmd_mount /bin/mount
linux_lvm_cmd_umount /bin/umount

retain hourly 3
verbose 2
loglevel 3
logfile /var/log/rsnapshot.log
lockfile /var/run/rsnapshot.pid

exclude /rsnapshot_backups
exclude /proc
exclude /lost+found
exclude /mnt
exclude /nfs
exclude /cifs
exclude /media
exclude /sys
exclude /dev
exclude /tmp

exclude /home/lost+found
exclude /home/raivo/bittorrent
exclude /home/raivo/Downloads/Liaison
exclude /home/raivo/movie
exclude /home/raivo/Music
exclude /home/raivo/Pictures
exclude /home/raivo/tmp
exclude /home/raivo/Video_Projects
exclude /home/raivo/Videos
exclude /home/raivo/.cache
exclude /home/raivo/.VirtualBox
exclude /home/raivo/.gvfs

link_dest 1
one_fs 1

backup / localhost/
-------------------------------------------------------------------
For some reason /boot, /home and /selinux are empty in the backup folders ... why ... my logfile looks OK:

[13/Jan/2011:16:47:18] /usr/bin/rsnapshot -c /etc/rsnapshot_zkab.conf hourly: started
[13/Jan/2011:16:47:18] echo 22589 > /var/run/rsnapshot.pid
[13/Jan/2011:16:47:18] /bin/rm -rf /rsnapshot_backups/zkab/hourly.2/
[13/Jan/2011:16:47:18] mv /rsnapshot_backups/zkab/hourly.1/ /rsnapshot_backups/zkab/hourly.2/
[13/Jan/2011:16:47:18] mv /rsnapshot_backups/zkab/hourly.0/ /rsnapshot_backups/zkab/hourly.1/
[13/Jan/2011:16:47:18] mkdir -m 0755 -p /rsnapshot_backups/zkab/hourly.0/
[13/Jan/2011:16:47:18] /usr/bin/rsync -ax --delete --numeric-ids --relative --delete-excluded --exclude=/rsnapshot_backups --exclude=/proc --exclude=/lost+found --exclude=/mnt --exclude=/nfs --exclude=/cifs --exclude=/media --exclude=/sys --exclude=/dev --exclude=/tmp --exclude=/home/lost+found --exclude=/home/raivo/bittorrent --exclude=/home/raivo/Downloads/Liaison --exclude=/home/raivo/movie --exclude=/home/raivo/Music --exclude=/home/raivo/Pictures --exclude=/home/raivo/tmp --exclude=/home/raivo/Video_Projects --exclude=/home/raivo/Videos --exclude=/home/raivo/.cache --exclude=/home/raivo/.VirtualBox --exclude=/home/raivo/.gvfs --exclude=rsnapshot_backups/zkab --link-dest=/rsnapshot_backups/zkab/hourly.1/localhost/ /. /rsnapshot_backups/zkab/hourly.0/localhost/
[13/Jan/2011:16:54:39] touch /rsnapshot_backups/zkab/hourly.0/
[13/Jan/2011:16:54:39] rm -f /var/run/rsnapshot.pid
[13/Jan/2011:16:54:39] /usr/bin/rsnapshot -c /etc/rsnapshot_zkab.conf hourly: completed successfully
 
Old 01-17-2011, 11:45 AM   #4
cepheus11
Member
 
Registered: Nov 2010
Location: Germany
Distribution: Gentoo
Posts: 286

Rep: Reputation: 91
Just a guess: You have enabled the one_fs option, which means that rsync does not backup mount points.

Quote:
Originally Posted by zkab View Post
one_fs 1
Do you have other filesystems mounted at /home, /boot and /selinux ?
 
Old 01-17-2011, 03:30 PM   #5
zkab
Member
 
Registered: Dec 2007
Posts: 142

Original Poster
Rep: Reputation: 16
I removed 'one_fs 1' and then got it OK
 
  


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
Modify rsnapshot backups manually brianmcgee Linux - Software 0 10-21-2009 01:54 AM
rsnapshot not automating backups Myiagros Linux - Server 9 08-05-2009 08:51 AM
[SOLVED] Remote rsync/rsnapshot backups as a limited privelege user Vanyel Linux - Software 1 07-30-2009 10:27 AM
LXer: rsnapshot - Local/Remote Filesystem backups utility in openSUSE LXer Syndicated Linux News 0 10-06-2008 07:41 PM
Backups with rsnapshot jeremy LQ Articles Discussion 0 07-30-2007 12:58 PM

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

All times are GMT -5. The time now is 09:48 AM.

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