Shair Ali | 15 Sep 12:32 2014
Picon

rsnapshot

does rsnapshot consumes data usage of internet because we have 200 gb  free internet..every week it is consuming 9 gb of data usage of internet..plz tell me whether it consumes internet data usage while taking backup

any help would be really appreciated..

------------------------------------------------------------------------------
Want excitement?
Manually upgrade your production database.
When you want reliability, choose Perforce
Perforce version control. Predictably reliable.
http://pubads.g.doubleclick.net/gampad/clk?id=157508191&iu=/4140/ostg.clktrk
_______________________________________________
rsnapshot-discuss mailing list
rsnapshot-discuss <at> lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/rsnapshot-discuss
Marcus Schopen | 12 Sep 16:47 2014
Picon

backup a rsnapshot repository to a fallback backupserver

Hi,

how would you backup a rsnapshot repository to a fallback backupserver?

Once a day a simple rsync on the whole repository like

 rsync -az -H --delete --numeric-ids /source backup2:/backup

or setting up rsnapshot on the fallback backupserver and rsnapshot e.g.
last hourly.0 or daily.0 on the primary backup server?

Ciao
Marcus

------------------------------------------------------------------------------
Want excitement?
Manually upgrade your production database.
When you want reliability, choose Perforce
Perforce version control. Predictably reliable.
http://pubads.g.doubleclick.net/gampad/clk?id=157508191&iu=/4140/ostg.clktrk
Marc GUILLAUME | 6 Sep 13:56 2014

virus scan with clamav of rsnapshot backups

Hello,

I backup several servers with rsnapshot over ssh. It works fine. And now I want tu scan my backup dir with
clamav. Il did a clamscan -i -r on my /var/cache/rsnapshot and deleted some infected mails. But this took 5
hours !

Now my dir is supposed clean. For the future I would like to scan only uploaded files, and not scan and rescan
always clean files yet scanned. 

Is there a way, some hook, in the rsnapshot processus, to scan and quarantine the infected files at incoming
time ?

I have only seen pre and post treatment scripts availables, but as I can't distinguish hard linked files,
with post treatment, I scan all my ~10 GB files in my hourly.0 for only 1 to 3 MB of new files uploaded. 

Has anybody an idea to guide me towards the good way, that would help me a lot ?

P.S.: I apologize for my so bad English :-(

--

-- 
Marc GUILLAUME
Développement - Réseau - Linux - Création sites Web
17, rue Jacques Bujault 79300 Bressuire
Tel : 05 49 65 10 25
siret : 452 046 360 00023 APE : 6209Z

------------------------------------------------------------------------------
Slashdot TV.  
Video for Nerds.  Stuff that matters.
http://tv.slashdot.org/
_______________________________________________
rsnapshot-discuss mailing list
rsnapshot-discuss <at> lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/rsnapshot-discuss
Marcus Schopen | 5 Sep 18:25 2014
Picon

monitoring, nagios plugins

Hi,

are there any good nagios plugins or other monitoring scripts to verify
rsnapshot runs?

Ciao
Marcus

------------------------------------------------------------------------------
Slashdot TV.  
Video for Nerds.  Stuff that matters.
http://tv.slashdot.org/
Hendrik Friedel | 2 Sep 20:12 2014

rsnapshot with rsyncd as target


Hello,

I have a small router on which I have a running rsyncd (daemon). I
would now like to have this as a target of my rsnapshot data.
I see only the option to use rsync over ssh in the options of
rsnapshot.conf, but not rsyncd.
Rsyncd can be apparently only be used as a source.

Is it correct, that rsyncd cannot be the target?

Regards,
Hendrik
Benoît Chantre | 11 Aug 10:58 2014
Picon

Rsync over SSH slow: can I use another tool to sync?

Hello,

I need to backup a remote NAS from another one in the same local network.
When I use rsync over SSH, it is really slow (~14 MB/s), but the native backup tool included with the firmware
can backup much faster and even in real time.

A workaround would be to use the native tool to do the sync job to the .sync folder and then to use only
rsnapshot hourly, daily, etc.
In this situation rsnapshot would be configured with the sync_first option but rsnapshot sync would not be
used. 

Can it work properly?

Best regards,
Benoît
------------------------------------------------------------------------------
Sebastian Jäschke | 6 Aug 22:45 2014
Picon

skipped due to rollback plan

Hi everyone,

I'm using rsnapshot for backing up several servers. To often I get this error (not only for one server):

"skipped due to rollback plan"

I can't find the reason why it fails, because there are no further messages in the logfile.

Does anyone know where does this come from and/or how I can set something like a debug level to get more
informations about this.

thanks a lot

Sebastian
------------------------------------------------------------------------------
Infragistics Professional
Build stunning WinForms apps today!
Reboot your WinForms applications with our WinForms controls. 
Build a bridge from your legacy apps to the future.
http://pubads.g.doubleclick.net/gampad/clk?id=153845071&iu=/4140/ostg.clktrk
Matthew Moore | 1 Aug 10:29 2014
Picon

rsnapshot not backing up mysql .MYD files

Folks,

I have a long running rsnapshot system which I use to back up all the
data on my IT systems.  I backup both specific shares and whole servers.

Last night I came to restore a MySQL database from my backups.  However
when I went to copy the database across I found out that a number of the
.MYD files were missing.  The rsnapshot process runs as root and has
permissions on the files.

Does anyone know why rsnapshot might not have copied the files over?  Is
there a setting I can use to force rsnapshot to copy a file over?

Cheers,

Matt

--

-- 
Matthew Moore
Linux Systems Administrator
SMTL - Surgical Materials Testing Laboratory
Princess of Wales Hospital
Bridgend
Tel - 01656 752165
Email - matt <at> smtl.co.uk

------------------------------------------------------------------------------
Want fast and easy access to all the code in your enterprise? Index and
search up to 200,000 lines of code with a free copy of Black Duck
Code Sight - the same software that powers the world's largest code
search on Ohloh, the Black Duck Open Hub! Try it now.
http://p.sf.net/sfu/bds
Vytenis A | 26 Jul 01:52 2014
Picon

Re: rsnapshot and find




On Sat, Jul 26, 2014 at 2:36 AM, Scott Hess <scott+rsnapshot <at> doubleu.com> wrote:
On Fri, Jul 25, 2014 at 4:19 PM, Vytenis A <vytenis.adm <at> gmail.com> wrote:
I don't understand why you believe this would take less time?  The rsync step would take less time in this case, but mostly because you're moving the recursive filesystem traversal out of rsync and into find.  But the overall time from start to finish shouldn't improve.  You're either traversing all of the relevant metadata or you aren't.

It takes less time because "rsync" doesn't compare all files on slow SATA with fast SAS - it already knows what to sync. A ton of read operations are saved.

rsync already doesn't compare all files, so that's not it.
 


How is that? Then how "rsync" builds a list of files to sync without comparing it with existing tree on slow drives?
 


 
If you run find, it recursively traverses the entire directory tree.  You need to consider the entire operation.
 

On slow backup drives and on fast server drives, and only if you use "--archive" option.

> If you run find, it recursively traverses the entire directory tree.  You need to consider the entire operation.

ONLY on fast server drives.

 
 
[If your tests are finding that find+rsync is faster than rsync alone, it is also possible that your find is not generating the same metadata as rsync is scanning for.  You might try various rsync options to trim the metadata used to see if that matters.  Personally I trust the defaults on this front, but it is possible that you are seeing an expense that's not worth paying in your case.]

man rsync:

<...>Rsync  finds files that need to be transferred using a “quick check” algorithm (by default) that looks for files that have changed in size or in last-modified time.<...>

Basically I do the same using "find". "ctime" timestamp changes when file size changes (file modified) or "mtime" is changed. See no difference here.

Yes, which means that your solution is likely not actually faster, just moving the runtime out of rsync and into find.


See above.


 

-scott




--
V.
------------------------------------------------------------------------------
Want fast and easy access to all the code in your enterprise? Index and
search up to 200,000 lines of code with a free copy of Black Duck
Code Sight - the same software that powers the world's largest code
search on Ohloh, the Black Duck Open Hub! Try it now.
http://p.sf.net/sfu/bds
_______________________________________________
rsnapshot-discuss mailing list
rsnapshot-discuss <at> lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/rsnapshot-discuss
Vytenis A | 25 Jul 22:40 2014
Picon

rsnapshot and find

Hi list,

Since this is a backup-related list, I want to post an idea for you guys to (dis)approve.

Backing up large amounts of files stresses SATA drives, so I thought - why not use "find" on the server with SAS disks to find files and directories modified during, say, last 24 hours and give the list to "rsync". That way backup job takes much much less time - ran some tests. Do you see any cons doing backups this way?

Second question: is it possible to implement this using rsnapshot? I like the idea of hard links, but it syncs directories. List of files would be a totally different approach.

Thanks!

--
V.

------------------------------------------------------------------------------
Want fast and easy access to all the code in your enterprise? Index and
search up to 200,000 lines of code with a free copy of Black Duck
Code Sight - the same software that powers the world's largest code
search on Ohloh, the Black Duck Open Hub! Try it now.
http://p.sf.net/sfu/bds
_______________________________________________
rsnapshot-discuss mailing list
rsnapshot-discuss <at> lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/rsnapshot-discuss
Benoît Chantre | 21 Jul 09:37 2014
Picon

Re: Rsnapshot on QNAP: error with logger -i (syslog)

I’m not sure to fully understand your reply.

I have assumed that $level is a numeric only, because it was used here for syslog
$result = system($config_vars{'cmd_logger'}, '-p', "$facility.$level", '-t', 'rsnapshot', $msg);

With a double check in the Syslog Protocol, I think I’m safe :-)
"Severity values MUST be in the range of 0 to 7 inclusive." : http://tools.ietf.org/html/rfc5424

One error was on this line : I used == instead of eq.
if ($config_vars{'cmd_logger'} == "log_tool") {

Now I have no more error.

Here’s the code if someone is interested by this solution.

# log messages to syslog
# accepts message, facility, level
# only message is required
# return 1 on success, undef on failure
sub syslog_msg {
	my $msg			= shift( <at> _);
	my $facility	= shift( <at> _);
	my $level		= shift( <at> _);
	my $result		= undef;
	
	if (!defined($msg))			{ return (undef); }
	if (!defined($facility))	{ $facility	= 'user'; }
	if (!defined($level))		{ $level	= 'info'; }
	
	if (defined($config_vars{'cmd_logger'})) {
		# print out our call to syslog
		if (defined($verbose) && ($verbose >= 4)) {
			if ($config_vars{'cmd_logger'} eq "log_tool") {
				if ($level < 3) {
					$level = 2;
				} elsif ($level == 4) {
					$level = 1;
				} else {
					$level = 0;
				}
				print_cmd("$config_vars{'cmd_logger'} -t $level -a [rsnapshot] $msg");
			} else {
				print_cmd("$config_vars{'cmd_logger'} -p $facility.$level -t rsnapshot $msg");
			}
		}
		
		# log to syslog
		if (0 == $test) {
			if ($config_vars{'cmd_logger'} eq "log_tool") {
				$result = system($config_vars{'cmd_logger'}, '-t', $level, '-a', $msg);
				if (0 != $result) {
					print_warn("Could not log to syslog:", 2);
					print_warn("$config_vars{'cmd_logger'} -t $level -a [rsnapshot], $msg", 2);
				}
			} else {
				$result = system($config_vars{'cmd_logger'}, '-p', "$facility.$level", '-t', 'rsnapshot', $msg);
				if (0 != $result) {
					print_warn("Could not log to syslog:", 2);
					print_warn("$config_vars{'cmd_logger'} -p $facility.$level -t rsnapshot $msg", 2);
				}
			}

		}
	}
	
	return (1);
}

David: are you interested to include that in the official version?
I can make a pull request if needed.

Thanks for your help!

Benoît

Le 18 juil. 2014 à 15:33, Christopher Barry <christopher.r.barry <at> gmail.com> a écrit :

> On Fri, 18 Jul 2014 10:47:38 +0200
> Benoît Chantre <bc <at> pulp.ch> wrote:
> 
>> Thanks Christopher for the explanation.
>> 
>> I did some progress by editing rsnapshot directly.
>> Perl is easier for me to understand than bash script.
>> 
>> It works, except the test to see if it was able to write to syslog.
>> I have commented the lines, because I don’t know how to solve that.
>> 
>> The error is
>> Argument "log_tool" isn't numeric in numeric eq (==)
>> at /opt/bin/rsnapshot line 2186. Argument "/sbin/log_tool" isn't
>> numeric in numeric eq (==) at /opt/bin/rsnapshot line 2186.
>> 
>> Do you have an idea how to solve that?
>> 
>> Here’s the code.
>> Let me know what do you think.
>> 
>> 
>> 
>> # log messages to syslog
>> # accepts message, facility, level
>> # only message is required
>> # return 1 on success, undef on failure
>> sub syslog_msg {
>> 	my $msg			= shift( <at> _);
>> 	my $facility	= shift( <at> _);
>> 	my $level		= shift( <at> _);
>> 	my $result		= undef;
>> 	
>> 	if (!defined($msg))			{ return (undef); }
>> 	if (!defined($facility))	{ $facility	= 'user'; }
>> 	if (!defined($level))		{ $level	=
>> 	'info'; }
>> 	
>> 	if (defined($config_vars{'cmd_logger'})) {
>> 		# print out our call to syslog
>> 		if (defined($verbose) && ($verbose >= 4)) {
>> 			if ($config_vars{'cmd_logger'} == "log_tool") {
>> 				if ($level < 3) {
>> 					$level = 2;
>> 				} elsif ($level == 4) {
>> 					$level = 1;
>> 				} else {
>> 					$level = 0;
>> 				}
>> 				print_cmd("$config_vars{'cmd_logger'}
>> 	-t $level -a [rsnapshot] $msg"); } else {
>> 				print_cmd("$config_vars{'cmd_logger'}
>> 	-i -p $facility.$level -t rsnapshot $msg"); }
>> 		}
>> 		
>> 		# log to syslog
>> 		if (0 == $test) {
>> 			if ($config_vars{'cmd_logger'} == "log_tool") {
>> 				#$result =
>> 	system($config_vars{'cmd_logger'}, '-t', "$level", '-a',
>> 	$msg); #if (0 != $result) { #	print_warn("Could not log
>> 	to syslog:", 2); #
>> 	print_warn("$config_vars{'cmd_logger'} -t $level -a
>> 	[rsnapshot] $msg", 2); } } else {
>> 				$result =
>> 	system($config_vars{'cmd_logger'}, '-p', "$facility.$level",
>> 	'-t', 'rsnapshot', $msg); if (0 != $result)
>> 	{ print_warn("Could not log to syslog:", 2);
>> 	print_warn("$config_vars{'cmd_logger'} -p $facility.$level -t
>> 	rsnapshot $msg", 2); } }
>> 
>> 		}
>> 	}
>> 	
>> 	return (1);
>> }
>> 
>> 
>> 
>> 
>> Le 17 juil. 2014 à 20:00, Christopher Barry
>> <christopher.r.barry <at> gmail.com> a écrit :
>> 
>>> On Thu, 17 Jul 2014 17:55:59 +0200
>>> Benoît Chantre <bc <at> pulp.ch> wrote:
>>> 
>>>> It was indeed a little abstract for me.
>>>> Thanks for the detailed explanation.
>>>> 
>>>> What I really need is to write errors to the log with a correct
>>>> status, otherwise I won’t receive an email alert (they are triggered
>>>> by errors only).
>>>> 
>>>> Do you think this is something realistic with some improvements in
>>>> your script?
>>>> 
>>>> At first, I have tried to redirect the error output from the cron
>>>> task to the log_tool command, but I haven’t enough knowledge to do
>>>> that, even with the help of Google. Maybe it can’t be done?
>>>> 
>>>> 
>>>> 
>>>> 
>>>> Le 17 juil. 2014 à 17:33, Christopher Barry
>>>> <christopher.r.barry <at> gmail.com> a écrit :
>>>> 
>>>>> On Thu, 17 Jul 2014 14:31:47 +0200
>>>>> Benoît Chantre <bc <at> pulp.ch> wrote:
>>>>> 
>>>>>> There’s a bit more of work than to change the command name:
>>>>>> log_tool supports only 3 event types (0 = Information, 1 =
>>>>>> Warning, 2 = Error)
>>>>>> 
>>>>>> I haven’t found how to adapt the levels to match these numbers.
>>>>>> (I’m a graphic designer)
>>>>>> 
>>>>>> Can you help me a bit more?
>>>>>> 
>>>>>> 
>>>>>> Le 17 juil. 2014 à 13:18, David Cantrell <david <at> cantrell.org.uk> a
>>>>>> écrit :
>>>>>> 
>>>>>>> On Wed, Jul 16, 2014 at 03:40:07PM +0200, Beno?t Chantre wrote:
>>>>>>> 
>>>>>>>> Thanks, there's no more error from rsnapshot, but I have no log
>>>>>>>> in syslog.
>>>>>>>> 
>>>>>>>> This is something due to the QNAP firmware.
>>>>>>>> As read here
>>>>>>>> (http://forum.qnap.com/viewtopic.php?f=50&t=95439), I should
>>>>>>>> use the write_log command.
>>>>>>>> 
>>>>>>>> Will rsnapshot support another command as log_tool ?
>>>>>>> 
>>>>>>> Yes, just set cmd_logger to some other tool.
>>>>>>> 
>>>>>>> -- 
>>>>>>> David Cantrell | Godless Liberal Elitist
>>>>>>> 
>>>>>>> "Every normal man must be tempted at times to spit on his hands,
>>>>>>> hoist the black flag, and begin slitting throats." -- H. L.
>>>>>>> Mencken
>>>>>> 
>>>>>> 
>>>>>> ------------------------------------------------------------------------------
>>>>>> Want fast and easy access to all the code in your enterprise?
>>>>>> Index and search up to 200,000 lines of code with a free copy of
>>>>>> Black Duck Code Sight - the same software that powers the world's
>>>>>> largest code search on Ohloh, the Black Duck Open Hub! Try it now.
>>>>>> http://p.sf.net/sfu/bds
>>>>>> _______________________________________________
>>>>>> rsnapshot-discuss mailing list
>>>>>> rsnapshot-discuss <at> lists.sourceforge.net
>>>>>> https://lists.sourceforge.net/lists/listinfo/rsnapshot-discuss
>>>>> 
>>>>> sorry - realized the last suggestion was probably of little help to
>>>>> you.
>>>>> 
>>>>> cut below, save to a file named /sbin/mylogger on the qnap, and
>>>>> then run 'chmod 755 /sbin/mylogger' in a terminal on the qnap.
>>>>> Then use mylogger as the logging cmd in rsnapshot.
>>>>> 
>>>>> cut below here:
>>>>> 
>>>>> #!/bin/bash
>>>>> # wrap the write_log command, removing any superfluous switches
>>>>> # we'll output everything as info (write_log '4')
>>>>> 
>>>>> # this will simply drop all switch parameters before the message.
>>>>> for token in "$ <at> "; do
>>>>>  [[ "$token" =~ ^-.* ]] && shift || continue
>>>>> done
>>>>> 
>>>>> write_log "$ <at> " 4
>>>>> 
>>>>> 
>>>>> ------------------------------------------------------------------------------
>>>>> Want fast and easy access to all the code in your enterprise? Index
>>>>> and search up to 200,000 lines of code with a free copy of Black
>>>>> Duck Code Sight - the same software that powers the world's
>>>>> largest code search on Ohloh, the Black Duck Open Hub! Try it now.
>>>>> http://p.sf.net/sfu/bds
>>>>> _______________________________________________
>>>>> rsnapshot-discuss mailing list
>>>>> rsnapshot-discuss <at> lists.sourceforge.net
>>>>> https://lists.sourceforge.net/lists/listinfo/rsnapshot-discuss
>>>>> 
>>>> 
>>> 
>>> Yeah, dig it. The above is a gross hack in itself, and to do what you
>>> want will require a bit more finesse and testing on the device. not
>>> sure I'm up to taking on that task for you myself, but I can teach
>>> you a little bit about fishing...
>>> 
>>> * when mylogger gets called, the special variable "$ <at> " has all the
>>> parameters in it, separated by spaces.
>>> 
>>> * logger's parameter for priority is -p <priority>. the priority can
>>> be a number, or a <facility>.<priority> pair. You'll need to
>>> understand what rsnapshot is actually feeding logger. You can do
>>> that by changing: 'write_log "$ <at> " 4' to echo "$ <at> " >>/tmp/debugfile.
>>> Then look in debugfile to see what the commandline being sent is.
>>> 
>>> * you'll need to parse out the priority rsnapshot sends (it'll be in
>>> the $ <at>  var). google 'awk' to understand how to parse that.
>>> 
>>> * you'll need to convert that priority into what write_log expects to
>>> get.
>>> 
>>> Good luck
>>> 
>>> --
>>> Regards,
>>> Christopher Barry
>>> 
>>> Random geeky fortune:
>>> It is better to wear chains than to believe you are free, and weight
>>> yourself down with invisible chains.
>>> 
>> 
> 
> http://www.perlmonks.org/?node_id=2637
> 
> also, keep in mind that $level may not come in as numeric. You should
> test for $level being one of the standard syslog levels, and convert to
> a number accordingly. 'man syslog' for list of valid level names.
> 
> --
> Regards,
> Christopher Barry
> 
> Random geeky fortune:
> : How would you disambiguate these situations?
> 
> By shooting the person who did the latter.
> 		-- Larry Wall in <199710290235.SAA02444 <at> wall.org>
> 

------------------------------------------------------------------------------
Want fast and easy access to all the code in your enterprise? Index and
search up to 200,000 lines of code with a free copy of Black Duck
Code Sight - the same software that powers the world's largest code
search on Ohloh, the Black Duck Open Hub! Try it now.
http://p.sf.net/sfu/bds

Gmane