DSM-G600, DNS-3xx and NSA-220 Hack Forum

Unfortunately no one can be told what fun_plug is - you have to see it for yourself.

You are not logged in.

Announcement

#1 2011-10-06 17:22:34

Keon91
Member
Registered: 2011-03-03
Posts: 24

Alt-f use cron and rsync to make a daily backup

Hi,

I can't figure out how to use cron to make a daily backup from my folder.

I want to use something like : 0 0 * * * /path to syncdata.sh

using this script in syncdata.sh:

#!/bin/sh
RSYNC=/usr/bin/rsync
LPATH=/mnt/sda2/r_sync_backup/
RPATH=/mnt/sdb1/www/

$RSYNC -av --progress --size-only  $RPATH $LPATH

where do I put it ?

I have cron and rsync enabled in alt-f...

Offline

 

#2 2011-10-07 21:32:14

jcard
Member
From: Portugal
Registered: 2008-09-21
Posts: 289

Re: Alt-f use cron and rsync to make a daily backup

Why don't you just use Services->System->Backup? It does mostly that...

'cron' does not yet has a configuration page, and its settings are not saved to flash, so you would have to set it every time you reboot the box (Backup cron settings are flash-saved)

Anyway, put your script on disk, e.g., /mnt/sda2/syncdata.sh, save your cron table also on disk, e.g. /mnt/sda2/mycron.lst,
   echo '0 0 * * *  /mnt/sda2/syncdata.sh' > /mnt/sda2/mycron.lst  # to create it
and tell cron to use it:
   crontab  /mnt/sda2/mycron.lst
and
   crontab -l # to list current cron jobs


Please consider discussing Alt-F at http://groups.google.com/group/alt-f/topics
Please consider filling Alt-F bugs at http://code.google.com/p/alt-f/issues/list

Offline

 

#3 2011-10-11 10:25:02

mbutler257
Member
Registered: 2008-09-08
Posts: 5

Re: Alt-f use cron and rsync to make a daily backup

Hi Keon91,
Have you seen http://dns323.kood.org/howto:backup it works well and could be just what you are looking for.

Mark

Offline

 

#4 2011-10-11 11:04:52

Keon91
Member
Registered: 2011-03-03
Posts: 24

Re: Alt-f use cron and rsync to make a daily backup

mbutler257 wrote:

Hi Keon91,
Have you seen http://dns323.kood.org/howto:backup it works well and could be just what you are looking for.

Mark

I can't use that because it uses cron.

I will use backup like jcard suggested.

Thanks!

Offline

 

Board footer

Powered by PunBB
© Copyright 2002–2010 PunBB