From: Sanjib Sikder <sanjibju2002@gmail.com>
To: Teemu Likonen <tlikonen@iki.fi>
Cc: emacs-orgmode@gnu.org
Subject: Re: org back up
Date: Thu, 18 Oct 2012 00:32:00 +0530 [thread overview]
Message-ID: <CAL1SgUoGAmddZAjxpARYOeANtkCAc7MZ+jf4TiAOfw_2oiLFrw@mail.gmail.com> (raw)
In-Reply-To: <878vb5q6u8.fsf@mithlond.arda>
[-- Attachment #1: Type: text/plain, Size: 1398 bytes --]
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 <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/*" \
> > -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" {} +
>
[-- Attachment #2: Type: text/html, Size: 2201 bytes --]
next prev parent reply other threads:[~2012-10-17 19:02 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-10-17 18:25 org back up Sanjib Sikder
2012-10-17 18:41 ` Teemu Likonen
2012-10-17 19:02 ` Sanjib Sikder [this message]
2012-10-17 19:08 ` Teemu Likonen
2012-10-17 19:26 ` Sanjib Sikder
2012-10-17 19:41 ` Teemu Likonen
2012-10-17 19:36 ` Nick Dokos
2012-10-17 19:38 ` Sanjib Sikder
2012-10-18 0:14 ` Suvayu Ali
2012-10-17 19:25 ` Achim Gratz
2012-10-17 20:05 ` Russell Adams
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.orgmode.org/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=CAL1SgUoGAmddZAjxpARYOeANtkCAc7MZ+jf4TiAOfw_2oiLFrw@mail.gmail.com \
--to=sanjibju2002@gmail.com \
--cc=emacs-orgmode@gnu.org \
--cc=tlikonen@iki.fi \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).