If I understand Sam's setup, what's going on here is that at some point
in the past Sam has gone through and made a list of specific files and
directories within his home directory that he wants rsnapshot to backup.
Later, Sam has deleted one of the directories he told rsnapshot to backup,
and rsnapshot has refused to backup anything at all because one of its
source directories does not exist.
Assuming I got the situation right, I think there are three ways this setup
can work sensibly:
(1) Sam takes care to review his rsnapshot config every time he creates,
deletes or renames a file/directory in his home directory to see whether
the rsnapshot config should be updated to reflect the new file/dir, remove
the old file/dir or change the file/dir name in rsnapshot.conf (depending
on whether he was backing up the old file name, and whether he wants to
backup the new file name).
In this scenario, for the case at hand Sam needs to remove /home/sam/.bu
from rsnapshot.conf soon after removing that directory.
(2) Sam changes the setup to use includes or an include file and tells
rsnapshot the source directory is /home/sam
backup /home/sam/ user/ include=projects,include=.vimrc,include=.backuper,include=.gnokiirc,include=.cron,exclude=*
or
backup /home/sam/ user/ include_file=/home/sam/backup.list,exclude=*
where /home/sam/backup.list contains names of files/directories to be backed up.
For example :-
$ cat /home/sam/backup.list
projects
.vimrc
.backuper
.gnokiirc
.cron
$
By using includes, rsnapshot won't complain that the source directory does not
exist (because it is just checking /home/sam for existence) if one of the files
in the backup list is deleted.
In this scenario, you won't get any errors or warnings if files on the backup
list do not exist. And obviously there is no warning if you create a new file
and dont add it to the backup list.
(3) Sam changes the setup to something like
backup /home/sam/ user/ exclude=dontbackupthisfile,exclude=notthiseither,exclude=*.exe
In other words by default backup everything in /home/sam, but exclude a
few specific files/directories from the backup. If there are a lot of
things to exclude, it might be easier to use something like
exclude_file=/home/sam/nobackup.list
(instead of exclude=...) and then put
dontbackupthisfile
notthiseither
*.exe
as the contents of /home/sam/nobackup.list.
Personally, I'd rather maintain a list of what NOT to backup (as scenario 3),
rather than what to include in backups. If I create a new file in my home
directory, I'd rather the default be to back it up. Disk space is cheap.
On Tue, Jun 05, 2012 at 10:56:52AM +0200, Jacques Foury wrote:
Hi all.
Sam, read the documentation carefully. As far as I remember, the
advice is to sync directories, and then write :
backup /home/sam/projects/ user/projects/
for example.
backing up files one by one is a strange choice to me.
Have fun,
Jacques
Le 01/06/2012 11:23, Sam Pinkus a écrit :
Maybe the confusion is cause because I accidently replaced a tab
with space when correcting the original config line I gave as an
example. Here is the line in context:
...
backup /home/sam/projects user/
backup /home/sam/.vimrc user/
backup /home/sam/.backuper user/
backup /home/sam/.bu xyz/
backup /home/sam/.gnokiirc xyz/
backup /home/sam/.cron xyz/
Its only the /home/sam/.bu line that fails, not because of spaces,
but because I deleted that directory. Im sure this is, well, sort
of a bug depending on how you look at it. I think it is a bug
because rsync does not die when it encounters a source file that
does not exist, it just gives you a warning. So rsnapshot's
behaviour is not consistent with that. I cant see a reason for it.
I patched my version of rsnapshot to not die when it finds a file
the does not exist, but warns instead. I could not find a better
solution, was easy enough, and I cant see it causing a problem? See
attached patch.
On 06/01/2012 04:52 PM, Helmut Hullen wrote:
Hallo, Sam,
Du meintest am 01.06.12:
ERROR: rsnapshot-user.conf on line 221:
ERROR: backup /var/.bu xyz/ - Source directory "/var/.bu" \
doesn't exist
OK fine warn me but dont stop the entire backup! rsync keeps going.
One solution is to use include patterns but its not very verbose.
Two possible solutions (untested)
backup "/var/.bu xyz/"
or
backup /var/.bu\ xyz/
[Toppost repaired, fullquote shortened]
No, guys there is a backup directive/line in the config like this:
backup /var/.bu xyz/
Yes - that's clear. And "rsnapshot" sees there 3 informations:
"backup",
"/var/.bu" and "xyz/". You have to tell "rsnapshot" that the
"space" in
".bu xyz" is a part of the directory name.
Have you tried my 2 proposals?
Viele Gruesse!
Helmut
-------------------------------------------------------------------
-----------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and
threat landscape has changed and how IT managers can respond.
Discussions
will include endpoint security, mobile security and the latest in
malware
threats.
[1]http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
_______________________________________________
rsnapshot-discuss mailing list
[2]rsnapshot-discuss < at > lists.sourceforge.net
[3]https://lists.sourceforge.net/lists/listinfo/rsnapshot-discuss
------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and
threat landscape has changed and how IT managers can respond. Discussions
will include endpoint security, mobile security and the latest in malware
threats. [4]http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
_______________________________________________
rsnapshot-discuss mailing list
[5]rsnapshot-discuss < at > lists.sourceforge.net
[6]https://lists.sourceforge.net/lists/listinfo/rsnapshot-discuss
References
1.
http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
2. mailto:rsnapshot-discuss < at > lists.sourceforge.net
3.
https://lists.sourceforge.net/lists/listinfo/rsnapshot-discuss
4.
http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
5. mailto:rsnapshot-discuss < at > lists.sourceforge.net
6.
https://lists.sourceforge.net/lists/listinfo/rsnapshot-discuss
------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and
threat landscape has changed and how IT managers can respond. Discussions
will include endpoint security, mobile security and the latest in malware
threats.
http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
_______________________________________________
rsnapshot-discuss mailing list
rsnapshot-discuss < at > lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/rsnapshot-discuss
--
___________________________________________________________________________
David Keegel <djk < at > cyber.com.au> Cyber IT Solutions Pty. Ltd.
http://www.cyber.com.au/~djk/ Linux & Unix Systems Administration
------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and
threat landscape has changed and how IT managers can respond. Discussions
will include endpoint security, mobile security and the latest in malware
threats.
http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
_______________________________________________
rsnapshot-discuss mailing list
rsnapshot-discuss < at > lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/rsnapshot-discuss