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