李欣 | 8 Oct 04:50 2014
Picon

Re: "DEST=/db_backup" is not executable or can't be found.

Hi Tapani,

Thanks for your reply.

I should make it more clear on what I am trying to do here,
because it does not make much sense in my last email.

1. Backup /var/ directory and mysql database for several servers.
2. Some servers need to backup locally, and some need to do it remotely.
3. I hope the local backup command and the remote backup command are as similar as possible

here is a part of my rsnapshot.conf:
# LOCALHOST
backup_script   /bin/true && DEST=/var/db_backup && /bin/mkdir -m 700 -p $DEST && /usr/bin/mysqldump -r $DEST/some_db.sql some_db       localhost/unused
backup  /       localhost/

# REMOTEHOST
backup_script   /usr/bin/ssh root <at> 192.168.0.2 'DEST=/var/db_backup && /bin/mkdir -m 700 -p $DEST && /usr/bin/mysqldump -r $DEST/some_db.sql some_db'    192.168.0.2/unused
backup  root <at> 192.168.0.2:/      192.168.0.2_scp/
#backup rsync://192.168.0.2/some_server/        192.192.0.2_rsync/
For database backup script,
I am considering writing a script to backup database like this:
# LOCALHOST
backup_script   /usr/local/bin/backup_db.sh -localhost       localhost/unused

# REMOTEHOST
backup_script   /usr/local/bin/backup_db.sh -remotehost 192.168.0.2      192.168.0.2/unused
It seems like an overkill to me thought since all I need is to run 3, 4 commands.
Please let me know if anyone knows a better way to do it.

> If you really want to bypass the directory management features > of backup_script and just dump the database to a directory > of your own choosing before the backup, you should use > cmd_preexec instead. I would like to use directory management features as you suggested,
but I am not sure how to do it for remote server.
Can anyone help me on this one, please?

P.S. Thanks for your mysql tips. It really helps.

LI Xin



On 2014/10/07 16:21, Tapani Tarvainen wrote:
On Oct 07 14:02, 李欣 (n3228 <at> ndensan.co.jp) wrote:
---------------------------------------------------------------------------- ERROR: /etc/rsnapshot.conf on line 212: ERROR: backup_script DEST=/db_backup && /bin/mkdir -m 700 -p $DEST && \ /usr/bin/mysqldump --opt some_db > $DEST/dbdump.sql \ localhost/unused - "DEST=/db_backup" is not executable or \ can't be found. Please use an absolute path. ERROR: ---------------------------------------------------------------------
You are not supposed to do it like that. Have you read what rsnapshot manual says about backup_script, including the examples? Anyway, I think you should get by with simply this: backup_script /usr/bin/mysqldump -r dbdump.sql some_db db_backup/ (in mysqldump --opt is on by default and -r is better than >) If you really want to bypass the directory management features of backup_script and just dump the database to a directory of your own choosing before the backup, you should use cmd_preexec instead. In general though, if you want something more complex in the backup_script, the recommended way is to put the commands in a separate file and call that instead of trying to put a sequence of shell commands directly in rsnapshot.conf. Indeed that's the only documented way, so anything else is unsupported and may break in a future version. (The man page doesn't mention even options to the script, even though actual code does take care of them properly. Perhaps that should be fixed in the man page, as cases like /usr/bin/mysqldump -r ... must be pretty common. I would not, however, rely on shell operators like && and > to work, even though they also actually do at present.) If you insist on doing it the hard way, however:
My fix is: backup_script /bin/true && DEST=/db_backup && /bin/mkdir -m 700 -p $DEST && /usr/bin/mysqldump --opt some_db > $DEST/dbdump.sql localhost/unused/
Ugh. The most obvious fix is to forgo the variable DEST and instead write the directory path twice, but that is also ugly. You could call shell explicitly, but I'm not sure if that's any better than using /bin/true: backup_script /bin/sh -c 'DEST=/db_backup && /bin/mkdir -m \ 700 -p $DEST && /usr/bin/mysqldump some_db > $DEST/dbdump.sql' \ localhost/unused/ Or you could get creative with shell features: backup_script /usr/bin/mysqldump some_db > $(DEST=/db_backup && \ /bin/mkdir -m 700 -p $DEST && echo $DEST)/dbdump.sql' \ localhost/unused/ But I really don't recommend doing things like that. (NB: all of the above are untested, try at your own risk.) Finally, you could of course patch rsnapshot to accept the syntax you want, or ask for someone else to do it. I don't think it'd gain much support, however.

------------------------------------------------------------------------------
Meet PCI DSS 3.0 Compliance Requirements with EventLog Analyzer
Achieve PCI DSS 3.0 Compliant Status with Out-of-the-box PCI DSS Reports
Are you Audit-Ready for PCI DSS 3.0 Compliance? Download White paper
Comply to PCI DSS 3.0 Requirement 10 and 11.5 with EventLog Analyzer
http://pubads.g.doubleclick.net/gampad/clk?id=154622311&iu=/4140/ostg.clktrk
_______________________________________________
rsnapshot-discuss mailing list
rsnapshot-discuss <at> lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/rsnapshot-discuss
groen01 | 2 Oct 11:39 2014

Multiple config files include_conf

Hello,

I try to use backticks to include a directory with config files:
include_conf   '/etc/rsnapshot.d'
also tried:
include_conf   '/etc/rsnapshot.d/'

but i get the following when to a configtest:
ERROR: include_conf '/etc/rsnapshot.d' - can't find or read file \

When I don't include a directory but a file i don't get an error:
include_conf    /etc/rsnapshot.d/server1.conf

What can be the problem?
Can somebody help me out?

+----------------------------------------------------------------------
|This was sent by wgroen <at> netaffairs.nl via Backup Central.
|Forward SPAM to abuse <at> backupcentral.com.
+----------------------------------------------------------------------

------------------------------------------------------------------------------
Meet PCI DSS 3.0 Compliance Requirements with EventLog Analyzer
Achieve PCI DSS 3.0 Compliant Status with Out-of-the-box PCI DSS Reports
Are you Audit-Ready for PCI DSS 3.0 Compliance? Download White paper
Comply to PCI DSS 3.0 Requirement 10 and 11.5 with EventLog Analyzer
http://pubads.g.doubleclick.net/gampad/clk?id=154622311&iu=/4140/ostg.clktrk
Shair Ali | 1 Oct 12:03 2014
Picon

rsnapshot

how to perform only incremental backups

and plz suggest me the diffrence bw the incremental and full backup  thank you
------------------------------------------------------------------------------
Meet PCI DSS 3.0 Compliance Requirements with EventLog Analyzer
Achieve PCI DSS 3.0 Compliant Status with Out-of-the-box PCI DSS Reports
Are you Audit-Ready for PCI DSS 3.0 Compliance? Download White paper
Comply to PCI DSS 3.0 Requirement 10 and 11.5 with EventLog Analyzer
http://pubads.g.doubleclick.net/gampad/clk?id=154622311&iu=/4140/ostg.clktrk
_______________________________________________
rsnapshot-discuss mailing list
rsnapshot-discuss <at> lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/rsnapshot-discuss
wenzong fan | 30 Sep 07:37 2014

About next release of rsnapshot?

Hi David and all,

The latest release for rsnapshot is 1.3.1 that generated in 2008. Is 
that time for generating next release for it?

Users would be happy to have a new release with latest changes I think :)

Regards
Wenzong

------------------------------------------------------------------------------
Meet PCI DSS 3.0 Compliance Requirements with EventLog Analyzer
Achieve PCI DSS 3.0 Compliant Status with Out-of-the-box PCI DSS Reports
Are you Audit-Ready for PCI DSS 3.0 Compliance? Download White paper
Comply to PCI DSS 3.0 Requirement 10 and 11.5 with EventLog Analyzer
http://pubads.g.doubleclick.net/gampad/clk?id=154622311&iu=/4140/ostg.clktrk
Nico Kadel-Garcia | 25 Sep 05:58 2014
Picon

Bash security vulnerability published, affects SSH based rsync access in rsnapshot

It seems there was an awkward vulnerability in the current releases of
Bash in various operating systems, particulary notable in Red Hat for
us RHEL and CentOS and Scientific Linux users.

            https://access.redhat.com/articles/1200223

            http://www.csoonline.com/article/2687265/application-security/remote-exploit-in-bash-cve-2014-6271.html

The vulnerability can allow abuse of even SSH credentials using
'ForceCommand' to control operations. That particularly includes rsync
setups, even those with restrictively configured SSH keys, as long as
the shell of the relevant target account  is /bin/bash or the symlink
to it at "/bin/sh" for many Linux systems.

It includes a lot of other setups, tool. Get cracking on those updates, folks!!!

------------------------------------------------------------------------------
Meet PCI DSS 3.0 Compliance Requirements with EventLog Analyzer
Achieve PCI DSS 3.0 Compliant Status with Out-of-the-box PCI DSS Reports
Are you Audit-Ready for PCI DSS 3.0 Compliance? Download White paper
Comply to PCI DSS 3.0 Requirement 10 and 11.5 with EventLog Analyzer
http://pubads.g.doubleclick.net/gampad/clk?id=154622311&iu=/4140/ostg.clktrk
Corey Reed | 23 Sep 04:14 2014
Picon

fixing a backup drive

Hi,

I was wondering if I could get some advice on the following situation.

I found that our backup drives here at work were not reformatted from 
ntfs. They are filling up, and I believe it's because the file system is 
causing every backup to be a full backup rather than an incremental.

For example,

$ sudo rsnapshot du
173G    /media/FantomHD/rsnapshot/weekly.0/
173G    /media/FantomHD/rsnapshot/weekly.1/
288M    /media/FantomHD/rsnapshot/weekly.2/
173G    /media/FantomHD/rsnapshot/weekly.3/
etc...

My plan is to copy a recent backup directory, as well as one or two 
older directories, off of the current drives. Then re-format them to 
ext4 and resume rsnapshot as normal.

Is there anything more I need to do? Will rsnapshot get thrown off by 
the sudden lack of any previous backups? Is there anything I'm overlooking?

Also, out of curiosity, is there a way to start from my oldest backup 
and "rebuild" incremental backups by rsync'ing to another disk that has 
an ext4 file system (prior to formatting mine)?

Thanks!

- Corey

------------------------------------------------------------------------------
Meet PCI DSS 3.0 Compliance Requirements with EventLog Analyzer
Achieve PCI DSS 3.0 Compliant Status with Out-of-the-box PCI DSS Reports
Are you Audit-Ready for PCI DSS 3.0 Compliance? Download White paper
Comply to PCI DSS 3.0 Requirement 10 and 11.5 with EventLog Analyzer
http://pubads.g.doubleclick.net/gampad/clk?id=154622311&iu=/4140/ostg.clktrk
Mark Dominik Bürkle | 22 Sep 13:19 2014
Picon

patch for checking the return value of preexec cmd

Hi,

I'm running rsnapshot with a patch to check for the return value of the
preexec cmd. On error ($? != 0), a message is printed and rsnapshot exits.
In my preexec script, I mount the backup target...

Please see the attached file for the patch.

Kind regards,
Mark Dominik Buerkle
Attachment (rsnapshot.patch): text/x-patch, 1040 bytes
------------------------------------------------------------------------------
Meet PCI DSS 3.0 Compliance Requirements with EventLog Analyzer
Achieve PCI DSS 3.0 Compliant Status with Out-of-the-box PCI DSS Reports
Are you Audit-Ready for PCI DSS 3.0 Compliance? Download White paper
Comply to PCI DSS 3.0 Requirement 10 and 11.5 with EventLog Analyzer
http://pubads.g.doubleclick.net/gampad/clk?id=154622311&iu=/4140/ostg.clktrk
_______________________________________________
rsnapshot-discuss mailing list
rsnapshot-discuss <at> lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/rsnapshot-discuss
Anthony Pause | 13 Sep 03:36 2014
Picon

Script util to send error mail

Hi team,

I create an util shell script to send a mail just when there are detected error.
I send juste one mail by day and by message error to avoid the spam.

I create a repository if you are interested.

https://github.com/citronbleuv/rsnapmail

(sorry for my english)

Regards,

Anthony PAUSE
------------------------------------------------------------------------------
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
alka5eltzer | 17 Sep 18:21 2014

Staggering 1st initial Backups

Hello all,

I've set up rsnapshot via the .conf file and it working out brilliantly.

Next now I'd like to set up the cron file to automate it.

How will it work with the initial set of backups.. i.e. I know my 1st daily backup (daily.0) with take some
time since it'll be the 1st one and about 500Gb of data will be written.
Will the second daily (daily.1) backup take the same amount of time/data?

Then the 1st Weekly (weekly.0)... will this be a large file also?.. and will it take a lot of time and so on.

Why I'm asking.. is that I'd like to make sure I stagger them properly so theres no problems

See my .conf file below.

# This is a sample cron file for rsnapshot.
# The values used correspond to the examples in /etc/rsnapshot.conf.
# There you can also set the backup points and many other things.
#
# To activate this cron file you have to uncomment the lines below.
# Feel free to adapt it to your needs.

# 0 */4         * * *           root    /usr/bin/rsnapshot hourly
30  3            * * *           root    /usr/bin/rsnapshot daily
0  2            * * 1           root    /usr/bin/rsnapshot weekly
01 12           1 * *           root    /usr/bin/rsnapshot monthly

Thanks for your help,

Shay

+----------------------------------------------------------------------
|This was sent by shayglenn <at> gmail.com via Backup Central.
|Forward SPAM to abuse <at> backupcentral.com.
+----------------------------------------------------------------------

------------------------------------------------------------------------------
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
Gail | 17 Sep 00:46 2014
Picon

rsync error

I keep getting 

Write failed: Broken pipe
rsync: connection unexpectedly closed (16220007821 bytes received so far) [receiver]
rsync error: error in rsync protocol datqa stream (code 12) at io.c(226) [receiver=3.1.0]
rsync: connection unexpectedly closed (108341 bytes received so far) [generator]
rsync error:  unexplained error (code 255) at io.c(226) [generator=3.1.0]
-------
rsnapshot enountered an error!  The program was invoked with thes options:
/usr/bin/rsnapshot hourly
-----------
ERROR: /usr/bin/rsync returned 255 while processing root <at> *host and directory*


It seems to happen at random times.
------------------------------------------------------------------------------
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
alka5eltzer | 15 Sep 12:51 2014

Beginner Rsnapshot & Webmin

Hello all,

Be gentle with me... I'm new with Rsnapshot

I've just installed Rsnapshot via a Webmin Module  ( http://tbanelwebmin.free.fr/ )

I use Webmin to manage a little a file server in an office.. its a 1TB system. (2off 1TB, RAID1)
(Ubuntu Linux Server 12.04.1)

At present I use Filesystem Backup to backup everything to an external 1Tb Seagate External USB drive once
per week (Sunday Night). This is a gzip Archive.

Going forward - I want to set the backup up maybe like the following:

Sun Night: Full System Backup
Mon Night: Incremental Backup
Tues Night: Incremental Backup
Wed Night: Incremental Backup
Thurs Night: Incremental Backup
Fri Night: Incremental Backup
Sat Night: Incremental Backup

Can Rsnapshot do the above?
If so... are there instructions on how to do this with Webmin... such as an example?

Thanks for your help

+----------------------------------------------------------------------
|This was sent by shayglenn <at> gmail.com via Backup Central.
|Forward SPAM to abuse <at> backupcentral.com.
+----------------------------------------------------------------------

------------------------------------------------------------------------------
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

Gmane