08-11-2008
Postgres : pg_dump Error
hi friends,
i have script to take backup of postgresql server ....i am getting error like access denied
myscript.sh
sendEmail=/home/backup/scripts/sendEmail.pl
DAY=`/bin/date +%d-%m-%y`
DIR=/home/backup/psql/$DAY
test -d $DIR | mkdir -p $DIR
dblist="test test1 postgres"
for db in $dblist
do
pg_dump $d > $DIR/$db.out
done
getting error
./myscript.sh: line 13: /home/backup/psql/11-08-08/test.out: Permission denied
./myscript.sh: line 14: /home/backup/psql/11-08-08/test1.out: Permission denied
./myscript.sh: line 15: /home/backup/psql/11-08-08/postgres.out: Permission denied
please help me to solve this error
9 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
I have got the solution so just closing this issue. (3 Replies)
Discussion started by: jambesh
3 Replies
2. Shell Programming and Scripting
Hi,
I'm working with postgres. Now I found a script to backup my databases.
# #!/bin/bash
#
# # setup environment
PG_PORT=5432
PG_HOME=/usr/lib/postgresql/8.3
PG_VAR=/backup
PG_DATA=/backup/data
PG_BACKUPS=/backup/backup
PG_LOGS=/backup/logs
... (6 Replies)
Discussion started by: karl_ha
6 Replies
3. Shell Programming and Scripting
I have a script that does db query in postgres. I'm trying to put in some error checking in the script. I keep running into the password prompt problem where when invalid credentials/or database is put it, it would prompt me for a password which hangs the script. Is there a way that I can check for... (0 Replies)
Discussion started by: zerofire123
0 Replies
4. Shell Programming and Scripting
Hi,
Please help me to write cron job for calling sql function
daily. I have Postgres database. (1 Reply)
Discussion started by: kulbhushan
1 Replies
5. Shell Programming and Scripting
hi all,
a have problem to load *.txt to postgres
my database:
id_list_ip (nextval)
list_ip (varchar)
txt file (list_ip.txt)
hasilping_10.8.248.1
hasilping_119.110.112.226
hasilping_119.110.125.33
hasilping_125.22.1.25
hasilping_192.168.2.1
hasilping_202.73.96.70
script... (3 Replies)
Discussion started by: adi0926
3 Replies
6. Shell Programming and Scripting
I have this 15 postgres sql queries similar to below to run in linux... Its taking a lot of time to run (3hours) .
can any one plz guide me how can i reduce the time of execution
execute 'insert into cc.rpt_cons_sub_ccdb_data(report_date, server_name, report_type, count)
select... (3 Replies)
Discussion started by: nikhil jain
3 Replies
7. UNIX for Advanced & Expert Users
Dear Friends,
I need to add the postgres process in monit file ( Debian machine ). How to add that process in monit?. If anyone know the solution for this, pls let me know.
---------- Post updated at 02:27 PM ---------- Previous update was at 12:21 PM ----------
I have found the... (0 Replies)
Discussion started by: rekha_sri
0 Replies
8. Shell Programming and Scripting
I made a script to remove Postgres if this is already installed on your system. I have a other script to install Postgres, so this script can be used before you going to install Postgres.
Do you like this script? I would love to hear feedback.
#!/bin/bash
#
#################################... (2 Replies)
Discussion started by: dannyvdberg
2 Replies
9. Shell Programming and Scripting
I have a situation where I have a list of airplanes that make a series of flights.
Therefore I am looking up the different flights that each airplane makes based on a postgres sql query:
select flightid from plane where airplane='DELTAx'
As a result I get a series of flight numbers... (0 Replies)
Discussion started by: JSNY
0 Replies
LEARN ABOUT DEBIAN
gpodder-backup
GPODDER-BACKUP(1) User Commands GPODDER-BACKUP(1)
NAME
gpodder-backup - Backup and restore utility for gPodder user data
SYNOPSIS
gpodder-backup [--create|--extract] <archive.gpo.tar.gz> [options] gpodder-backup --purge
DESCRIPTION
This utility can be used to create a dump of the current gPodder data (configuration files + downloads), optionally replacing the real con-
tents of the download folder with zero-byte files (for submitting your data to a bug report without having to transfer lots of data).
OPTIONS
--version
show program's version number and exit
-h, --help
show this help message and exit
-c <FILE>, --create=<FILE>
Create a new archive
-x <FILE>, --extract=<FILE>
Extract an existing archive
-f, --fake-downloads
Store downloads as zero-byte files in backup
-n, --no-covers
Do not include cover files in archive
-D <DIR>, --destination=<DIR>
Extract downloads in different folder
-P, --purge
Remove current data (can be combined with --extract)
USAGE FOR BUG REPORTING
This command is useful if you want to report a bug in gPodder:
gpodder-backup --create bug123.gpo.tar.gz --fake-downloads
Backup your current data to file bug123.gpo.tar.gz, but don't store download data (create zero-size dummy files instead). You can
then attach bug123.gpo.tar.gz to the bug report.
If you are instructed to try gPodder from a "clean state", you can use the following command (be sure to backup your data before!):
gpodder-backup --purge
Remove all gPodder data, so you can start from a clean state
EXAMPLES
gpodder-backup --create today.gpo.tar.gz
Backup your current data to file today.gpo.tar.gz
gpodder-backup --extract mybackup.gpo.tar.gz
Restore (without purging) the contents of mybackup.gpo.tar.gz
gpodder-backup --extract default.gpo.tar.gz --purge
Remove current data, then restore the contents of default.gpo.tar.gz
gpodder-backup --purge
Remove all gPodder data, so you can start from a clean state
EXTRACTING FAKED DOWNLOADS
Please note that any existing downloads will be overwritten with zero-byte files when using the --extract option of the gpodder-backup
utility with a backup created with --fake-downloads
AUTHOR
gpodder-backup was written by Thomas Perl (thp@gpodder.org)
gpodder-backup 1.0 December 2010 GPODDER-BACKUP(1)