From mboxrd@z Thu Jan 1 00:00:00 1970 From: Sanjib Sikder Subject: Re: org back up Date: Thu, 18 Oct 2012 00:32:00 +0530 Message-ID: References: <878vb5q6u8.fsf@mithlond.arda> Mime-Version: 1.0 Content-Type: multipart/alternative; boundary=e89a8f64389639333504cc45eacf Return-path: Received: from eggs.gnu.org ([208.118.235.92]:36170) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TOYt9-0001sj-N8 for emacs-orgmode@gnu.org; Wed, 17 Oct 2012 15:02:51 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1TOYt8-0000wF-91 for emacs-orgmode@gnu.org; Wed, 17 Oct 2012 15:02:43 -0400 Received: from mail-ie0-f169.google.com ([209.85.223.169]:59874) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TOYt8-0000wA-2g for emacs-orgmode@gnu.org; Wed, 17 Oct 2012 15:02:42 -0400 Received: by mail-ie0-f169.google.com with SMTP id 10so15416755ied.0 for ; Wed, 17 Oct 2012 12:02:41 -0700 (PDT) In-Reply-To: <878vb5q6u8.fsf@mithlond.arda> List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: Teemu Likonen Cc: emacs-orgmode@gnu.org --e89a8f64389639333504cc45eacf Content-Type: text/plain; charset=ISO-8859-1 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" {} + echo "Daily Org Files Backup Successful: $(date)" >> /home/USERNAME/mybackupOrg.log ------------------------------------------- And then changed the crontab hourly setting to 26. /etc/crontab # m h dom mon dow user command 26 * * * * root cd / && run-parts --report /etc/cron.hourly ------------------------------------------- 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 ? Thanks ----------------------------- *Sanjib Sikder *Ph.D. Fellow Chemical Engineering IIT Bombay* * On Thu, Oct 18, 2012 at 12:11 AM, Teemu Likonen wrote: > 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 "$target" && \ > find "$HOME" -type f -name '*.org' ! -path "$target/*" \ > -exec cp -t "$target" {} + > --e89a8f64389639333504cc45eacf Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Hi,

No it is not working.

I copied the code in the backup.sh = file and put into /etc/cron.hourly
-------------------------------------= ------
#!/bin/sh

target=3D$HOME/org/backupOrg
mkdir -p "$= target" && \
=A0=A0=A0=A0=A0=A0=A0 find "$HOME" -type f -name '*.org' = ! -path "$target/*" \
=A0=A0=A0=A0=A0=A0=A0 -exec cp -t "= $target" {} +

echo "Daily Org Files Backup Successful: $(d= ate)" >> /home/USERNAME/mybackupOrg.log
-------------------------------------------
And then changed the crontab= hourly setting to 26.

/etc/crontab
# m h dom mon dow user=A0=A0= =A0 command
26 *=A0=A0=A0 * * *=A0=A0=A0 root=A0=A0=A0 cd / && r= un-parts --report /etc/cron.hourly
-------------------------------------------

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 ?

Thanks

----------------------------= -
Sanjib Sik= der
Ph.D. Fellow
Ch= emical Engineering
IIT Bombay






On Thu, Oct 18, 2012 at 12:11 AM, Teemu = Likonen <tlikonen@iki.fi> wrote:
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/*" \
> =A0 =A0 -exec cp -t /home/USERNAME/org/backup/ \{\} \;

How about this:


#!/bin/sh

target=3D$HOME/org/backup
mkdir -p "$target" && \
=A0 =A0 =A0 =A0 find "$HOME" -type f -name '*.org' ! -pat= h "$target/*" \
=A0 =A0 =A0 =A0 -exec cp -t "$target" {} +

--e89a8f64389639333504cc45eacf--