[HOWTO] Daily incremental backup with rsnapshot

Discussion on remote replication.

Re: [HOWTO] Daily incremental backup with rsnapshot

Postby Breezer » Sat Oct 02, 2010 7:48 pm

Great manual Crushdepth, do you already have the restore tested and described step-by-step ?

Cheers,

Johan
Qnap TS-409 Pro + 4 x 500GB WDC WD5000AAKS-00YGA12.0
Qnap TS-859 Pro + 8 x 2 TB WD20EADS-00R6B0
Breezer
Starting out
 
Posts: 26
Joined: Fri Feb 08, 2008 3:24 am
Location: Belgium
NAS Model: TS-659 Pro

Re: [HOWTO] Daily incremental backup with rsnapshot

Postby Chris S » Thu Oct 07, 2010 8:45 pm

DasUli wrote:Just for the record, i formatted the usb drive with ext4, now it´s working fine. The problem was the NTFS file system. Thanks for input, Mike!


Was the problem only with copying files using windows?

I make my backups to a share folder in the qnap. Id like to be able to restore those backups through the web file manager. Will that be possible?
My iscsi partitions are all ntfs.
Chris S
New here
 
Posts: 9
Joined: Fri Sep 24, 2010 4:37 pm
NAS Model: TS-459 Pro+

Re: [HOWTO] Daily incremental backup with rsnapshot

Postby bramschats » Sat Oct 09, 2010 3:53 am

Great guide crushdepth,

If you only could at email log sending,which is not working for me so far, at your howto it would be complete.......
Qnap TS-459pro II | Qnap TS-239pro | HDI Dune prime 3.0 |
bramschats
Easy as a breeze
 
Posts: 392
Joined: Thu Apr 23, 2009 1:51 am
NAS Model: TS-259 Pro+

Re: [HOWTO] Daily incremental backup with rsnapshot

Postby Regor » Sat Oct 09, 2010 3:37 pm

Great guide crushdepth :shock: 8) !!
and thanks to efaden for the mail script

humm I was wondering if Qnap forum team talk together ?
I've just found this http://forum.qnapclub.de/viewtopic.php?f=208&t=10097 !
And as I don't speak germain can someone translate this ? I think it about a rsnashot GUI ....

and
bramschats wrote:Great guide crushdepth,
If you only could at email log sending,which is not working for me so far, at your howto it would be complete.......

it's really a copy/paste in a xx.sh file and change the email adress parameters...
from efaden post here http://forum.qnap.com/viewtopic.php?f=22&t=13025&start=45#p104819
TS-109 fw 3.3.0 build 0924T
TS-239 Pro II + 3.7.1 Build 20120615
Regor
Know my way around
 
Posts: 153
Joined: Mon Dec 31, 2007 6:36 pm
Location: Paris
NAS Model: TS-239 Pro+

Re: [HOWTO] Daily incremental backup with rsnapshot

Postby bramschats » Sat Oct 09, 2010 4:12 pm

Regor,

thnx, i've made the script and crontab entry and put in my settings as discribed in http://forum.qnapclub.de/viewtopic.php?f=208&t=10097 how can i test this is working?

thnx in advance.
Qnap TS-459pro II | Qnap TS-239pro | HDI Dune prime 3.0 |
bramschats
Easy as a breeze
 
Posts: 392
Joined: Thu Apr 23, 2009 1:51 am
NAS Model: TS-259 Pro+

Re: [HOWTO] Daily incremental backup with rsnapshot

Postby Regor » Sat Oct 09, 2010 4:30 pm

Hi,

bramschats wrote:Regor,

thnx, i've made the script and crontab entry and put in my settings as discribed in http://forum.qnapclub.de/viewtopic.php?f=208&t=10097 how can i test this is working?

thnx in advance.

As I said I don't speak german ... so I don't know how to implement their scripts ...
TS-109 fw 3.3.0 build 0924T
TS-239 Pro II + 3.7.1 Build 20120615
Regor
Know my way around
 
Posts: 153
Joined: Mon Dec 31, 2007 6:36 pm
Location: Paris
NAS Model: TS-239 Pro+

Re: [HOWTO] Daily incremental backup with rsnapshot

Postby bramschats » Sat Oct 09, 2010 7:16 pm

Regor,

sorry i meant this threat viewtopic.php?f=22&t=13025&start=45#p104819 for emailing.....
Qnap TS-459pro II | Qnap TS-239pro | HDI Dune prime 3.0 |
bramschats
Easy as a breeze
 
Posts: 392
Joined: Thu Apr 23, 2009 1:51 am
NAS Model: TS-259 Pro+

Re: [HOWTO] Daily incremental backup with rsnapshot

Postby Q » Sat Oct 09, 2010 7:58 pm

I've just found this http://forum.qnapclub.de/viewtopic.php?f=208&t=10097 !
And as I don't speak germain can someone translate this ? I think it about a rsnashot GUI ....

yeah it is :) working great! frosch2 did a really good job. i already tested the v2 beta (not released yet to the public) and it's even more awesome :D translation to english is planned for the future, but currently it's impossible to say when it will be ready.
I am Q
www.qnap.ch

I don't work at QNAP.
And RAID is really NO backup!
User avatar
Q
Experience counts
 
Posts: 1442
Joined: Wed Sep 05, 2007 4:18 pm
Location: Switzerland
NAS Model: TS-110

Re: [HOWTO] Daily incremental backup with rsnapshot

Postby Regor » Sat Oct 09, 2010 9:33 pm

bramschats wrote:Regor,

sorry i meant this threat viewtopic.php?f=22&t=13025&start=45#p104819 for emailing.....

ahh
just verify the ligne where the address mail is written and the path to the rsnapshot log
for trying, comment the last ligne with # where the temp log is remove and... run it and when it's ok uncomment the line

I advise you to run this by adding in rsnapshot.conf the cmd "cmd_postexec tab the-path/to-your-script.sh", in that way the script will be rune at each rsnapshot backup ... (look at the how-to of rsnapshot.org)
here is what I add in the rsnapshot.conf just after the cmd_du command
...
# Uncomment this to specify a path to "du" for disk usage checks.
cmd_du /opt/bin/du

# commande post execution
cmd_postexec /share/Qsauv/rsnapshot-maillog.sh


#########################################
# BACKUP INTERVALS #
# Must be unique and in ascending order #
# i.e. hourly, daily, weekly, etc. #
#########################################

...

Hope this help
TS-109 fw 3.3.0 build 0924T
TS-239 Pro II + 3.7.1 Build 20120615
Regor
Know my way around
 
Posts: 153
Joined: Mon Dec 31, 2007 6:36 pm
Location: Paris
NAS Model: TS-239 Pro+

Re: [HOWTO] Daily incremental backup with rsnapshot

Postby bramschats » Sun Oct 10, 2010 12:05 am

Regor,

I have created the script in /share/MD0_DATA/System/rsnapshot_log.sh with the script and edited my mail settings.
Code: Select all
MAIL_TO="my@email.com"                                           
MAIL_HEADER_TO="Me <my@email.com>"         
MAIL_HEADER_FROM="QNAP <qnap@email.com>"   


I have made a crontab entry: 55 23 * * * /share/MD0_DATA/System/rsnapshot_log.sh

for trying, comment the last ligne with # where the temp log is remove and... run it and when it's ok uncomment the line

But how can i start the script and make it executable?

Do i need to add this in this file?
Add the alias in to /etc/config/ssmtp/revaliases...


I did put this line in in: /opt/etc/rsnapshot.conf beneath:
Code: Select all
cmd_du /opt/bin/du

# commande post execution
cmd_postexec /share/MD0_DATA/System/rsnapshot_log.sh


thanks in advance.
Qnap TS-459pro II | Qnap TS-239pro | HDI Dune prime 3.0 |
bramschats
Easy as a breeze
 
Posts: 392
Joined: Thu Apr 23, 2009 1:51 am
NAS Model: TS-259 Pro+

Re: [HOWTO] Daily incremental backup with rsnapshot

Postby Regor » Sun Oct 10, 2010 12:25 am

Hi,

I have created the script in /share/MD0_DATA/System/rsnapshot_log.sh with the script and edited my mail settings.

MAIL_TO="my@email.com"
MAIL_HEADER_TO="Me <my@email.com>"
MAIL_HEADER_FROM="QNAP <qnap@email.com>"

seems ok, if you put the real email address not my@email.com neither qnap@email.com !

I have made a crontab entry: 55 23 * * * /share/MD0_DATA/System/rsnapshot_log.sh

not needed if you add cmd_postexec ...

But how can i start the script and make it executable?

at prompt : chmod +x /share/MD0_DATA/System/rsnapshot_log.sh
and at prompt : /share/MD0_DATA/System/rsnapshot_log.sh <enter>

Do i need to add this in this file?

Add the alias in to /etc/config/ssmtp/revaliases...

I didn't add it but it works

I did put this line in in: /opt/etc/rsnapshot.conf beneath:

cmd_du /opt/bin/du

# commande post execution
cmd_postexec /share/MD0_DATA/System/rsnapshot_log.sh

so you won't need entry in crontab

verify that you use TAB between cmd_postexec and /share/MD0_DATA/System/rsnapshot_log.sh
or you will have an error

hope this help ...
TS-109 fw 3.3.0 build 0924T
TS-239 Pro II + 3.7.1 Build 20120615
Regor
Know my way around
 
Posts: 153
Joined: Mon Dec 31, 2007 6:36 pm
Location: Paris
NAS Model: TS-239 Pro+

Re: [HOWTO] Daily incremental backup with rsnapshot

Postby bramschats » Sun Oct 10, 2010 1:12 am

thnx,

yes it works but having also an error when testing:

Code: Select all
[/share/MD0_DATA/System] # /share/MD0_DATA/System/rsnapshot_log.sh
----------------------------------------------------------------------------
rsnapshot encountered an error! The program was invoked with these options:
/opt/bin/rsnapshot du
----------------------------------------------------------------------------
ERROR: /opt/etc/rsnapshot.conf on line 62:
ERROR: cmd_postexec /share/MD0_DATA/System/rsnapshot_log.sh
ERROR: ---------------------------------------------------------------------
ERROR: Errors were found in /opt/etc/rsnapshot.conf,
ERROR: rsnapshot can not continue. If you think an entry looks right, make
ERROR: sure you don't have spaces where only tabs should be.
[/share/MD0_DATA/System] #


on line 62 in rsnapshot i have:
Code: Select all
# commande post execution
cmd_postexec    /share/MD0_DATA/System/rsnapshot_log.sh


What is going wrong here.
Qnap TS-459pro II | Qnap TS-239pro | HDI Dune prime 3.0 |
bramschats
Easy as a breeze
 
Posts: 392
Joined: Thu Apr 23, 2009 1:51 am
NAS Model: TS-259 Pro+

Re: [HOWTO] Daily incremental backup with rsnapshot

Postby Regor » Sun Oct 10, 2010 3:01 pm

Hi,
# commande post execution
cmd_postexec /share/MD0_DATA/System/rsnapshot_log.sh
What is going wrong here.

is there any SPACE charactere between cmd_postexec and /share/.... ?
It must be a TAB charactere !
TS-109 fw 3.3.0 build 0924T
TS-239 Pro II + 3.7.1 Build 20120615
Regor
Know my way around
 
Posts: 153
Joined: Mon Dec 31, 2007 6:36 pm
Location: Paris
NAS Model: TS-239 Pro+

Re: [HOWTO] Daily incremental backup with rsnapshot

Postby bramschats » Sun Oct 10, 2010 5:50 pm

thanks,

now it is working without errors, great.

this is my etc/config/crontab
Code: Select all
0 */4 * * * /opt/bin/rsnapshot hourly
30 23 * * * /opt/bin/rsnapshot daily
30 22 * * 0 /opt/bin/rsnapshot weekly
30 21 1 * * /opt/bin/rsnapshot monthly


but my script only starts manually by typing /share/MD0_DATA/System/rsnapshot_log.sh or running for example rsnapshot hourly:

Code: Select all
[~] # rsnapshot hourly
echo 21496 > /opt/var/run/rsnapshot.pid
/opt/bin/rm -rf /opt/var/rsnapshot/hourly.5/
mv /opt/var/rsnapshot/hourly.4/ /opt/var/rsnapshot/hourly.5/
mv /opt/var/rsnapshot/hourly.3/ /opt/var/rsnapshot/hourly.4/
mv /opt/var/rsnapshot/hourly.2/ /opt/var/rsnapshot/hourly.3/
mv /opt/var/rsnapshot/hourly.1/ /opt/var/rsnapshot/hourly.2/
mv /opt/var/rsnapshot/hourly.0/ /opt/var/rsnapshot/hourly.1/
mkdir -m 0755 -p /opt/var/rsnapshot/hourly.0/
/opt/bin/rsync -a --delete --numeric-ids --relative --delete-excluded \
    --link-dest=/opt/var/rsnapshot/hourly.1/localhost/ \
    /share/MD0_DATA/Public /opt/var/rsnapshot/hourly.0/localhost/
touch /opt/var/rsnapshot/hourly.0/
/share/MD0_DATA/System/rsnapshot_log.sh
rm -f /opt/var/run/rsnapshot.pid
[~] #


But it does not start automatic in crontab!

What am i doing wrong here?
Qnap TS-459pro II | Qnap TS-239pro | HDI Dune prime 3.0 |
bramschats
Easy as a breeze
 
Posts: 392
Joined: Thu Apr 23, 2009 1:51 am
NAS Model: TS-259 Pro+

Re: [HOWTO] Daily incremental backup with rsnapshot

Postby Regor » Mon Oct 11, 2010 2:52 am

Did you reload crontab ?
At prompt : crontab /etc/config/crontab
And to verify crontab -l
TS-109 fw 3.3.0 build 0924T
TS-239 Pro II + 3.7.1 Build 20120615
Regor
Know my way around
 
Posts: 153
Joined: Mon Dec 31, 2007 6:36 pm
Location: Paris
NAS Model: TS-239 Pro+

PreviousNext

Return to Remote Replication/ Disaster Recovery

Who is online

Users browsing this forum: No registered users and 0 guests