1 |
On Sunday 05 May 2013 17:56:33 Tanstaafl wrote: |
2 |
> Ok, another little thing... |
3 |
> |
4 |
> Is there a simple way to use date/time variables in cronjobs? Or do I |
5 |
> need to use a bash script for this? I prefer simple, and just using the |
6 |
> variables directly in the cron command would be easier if it works, so |
7 |
> figured I'd ask first... |
8 |
> |
9 |
> I'm trying to schedule a dump of my databases like so: |
10 |
> |
11 |
> pg_dumpall --username=username -o -f |
12 |
> /home/user/mypg_backups/hourly/\%y/\%m/\%d/\%t.sql.gz |
13 |
> |
14 |
> But trying to run this command fails with: |
15 |
> |
16 |
> pg_dumpall: could not open the output file |
17 |
> "/home/user/mypg_backups/hourly/%y/%m/%d/%t.sql.gz": No such file or |
18 |
> directory |
19 |
> |
20 |
> Tried escaping the variables and not, same error... |
21 |
|
22 |
Is it perhaps a matter of the process having write access? |
23 |
|
24 |
-- |
25 |
Regards, |
26 |
Mick |