Re: [O] org back up

2012-10-17 Thread Suvayu Ali
Hello Sanjib and others, Sorry to continue with this terribly off-topic thread, but as the person who wrote that snippet I felt I should clarify. On Wed, Oct 17, 2012 at 03:36:42PM -0400, Nick Dokos wrote: > Teemu Likonen wrote: > > > Sanjib Sikder [2012-10-18 00:32:00 +0530] wrote: > > > > >

Re: [O] org back up

2012-10-17 Thread Russell Adams
I second using a VCS instead. I have my Org files in a Bazaar repo, and a cron job setup to commit hourly if changes occur. On Wed, Oct 17, 2012 at 09:25:15PM +0200, Achim Gratz wrote: > Sanjib Sikder writes: > > I wanted to set a cron job for backing up all my org files as > > suggested by Suva

Re: [O] org back up

2012-10-17 Thread Teemu Likonen
Sanjib Sikder [2012-10-18 00:56:46 +0530] wrote: > I do not find personal crontab file. how do I create it ? crontab -e says > my personal file is not there With "crontab -e" in Debian system. > If I want to run it as root then how do modify the following code as > it is nor working .. You shou

Re: [O] org back up

2012-10-17 Thread Sanjib Sikder
Hi, Thanks a lot. - *Sanjib Sikder *Ph.D. Fellow Chemical Engineering IIT Bombay* * On Thu, Oct 18, 2012 at 1:06 AM, Nick Dokos wrote: > Teemu Likonen wrote: > > > Sanjib Sikder [2012-10-18 00:32:00 +0530] wrote: > > > > > Even after 26th minute, there is no sig

Re: [O] org back up

2012-10-17 Thread Nick Dokos
Teemu Likonen wrote: > Sanjib Sikder [2012-10-18 00:32:00 +0530] wrote: > > > Even after 26th minute, there is no sign of the code in work. Is it that > > $HOME is not allowed and I need to give full path ? > > Ah, I thought that you'd run it from your personal crontab. So yes, > write paths fr

Re: [O] org back up

2012-10-17 Thread Sanjib Sikder
Hi, I do not find personal crontab file. how do I create it ? crontab -e says my personal file is not there If I want to run it as root then how do modify the following code as it is nor working .. --- #!/bin/bash mkdir -p /home/USERNAME/org/backup && \ find $HOME -type f -name '

Re: [O] org back up

2012-10-17 Thread Achim Gratz
Sanjib Sikder writes: > I wanted to set a cron job for backing up all my org files as > suggested by Suvayu Ali. Please don't. If you consider this a viable backup strategy, you might just as well have no backup at all. You should use a VCS like Git to be able to revert to an earlier version of

Re: [O] org back up

2012-10-17 Thread Teemu Likonen
Sanjib Sikder [2012-10-18 00:32:00 +0530] wrote: > Even after 26th minute, there is no sign of the code in work. Is it that > $HOME is not allowed and I need to give full path ? Ah, I thought that you'd run it from your personal crontab. So yes, write paths from root's point of view.

Re: [O] org back up

2012-10-17 Thread Sanjib Sikder
Hi, No it is not working. I copied the code in the backup.sh file and put into /etc/cron.hourly --- #!/bin/sh target=$HOME/org/backupOrg mkdir -p "$target" && \ find "$HOME" -type f -name '*.org' ! -path "$target/*" \ -exec cp -t "$target"

Re: [O] org back up

2012-10-17 Thread Teemu Likonen
Sanjib Sikder [2012-10-17 23:55:12 +0530] wrote: > #!/bin/bash > > mkdir -p /home/USERNAME/org/backup && \ > find $HOME -type f -name '*\.org' ! -path "/home/USERNAME/org/backup/*" \ > -exec cp -t /home/USERNAME/org/backup/ \{\} \; How about this: #!/bin/sh target=$HOME/org/backup mkdir -p

[O] org back up

2012-10-17 Thread Sanjib Sikder
Hi, I wanted to set a cron job for backing up all my org files as suggested by Suvayu Ali. #!/bin/bash mkdir -p ~/org/backup && \ find $HOME -type f -name '*\.org' ! -path "$HOME/org/backup/*" \ -exec cp -t ~/org/backup/ \{\} \; In Ubuntu I have put the bash file in cron.daily but it seems