We have a need to send PostgreSQL DB backup to CRM developer. We send them and get feedback that the backup can't be "uzipped", as archive is broken.
The backup script snippet looks like this:
pg_dump -c -O -U postgres $x -h localhost -p 5432 --disable-dollar-quoting -i | gzip > $BACKUPDIR/$DT-$x.gz
We chceck the backup process and in our opinion there is no any issue with backuping system.
btw. They used 7Zip to unzip.
Question: What would you suggest to me to say to CRM Development Team .... what could be the problem ?
btw. In fact as so far we do not do any test for restoring, and I know must do this due to the security reason.
Question 2 We found that on Linux server all was properly backuped. When we copy them with to SMB resource and get to Windows station then even 7zip is unpacking them correctly.
We found that the problem is with sending them to local FTP server. We are sending this files by this BASH script:
#!/bin/sh
echo FTP file: $1 UPLOAD START
#pwd
ftp -n 192.168.1.205 <<END_SCRIPT
quote user userslogin
quote pass userspassw
cd /Backup
pwd
put $1
quit
quit
END_SCRIPT
exit 0
Could somebody say how to improve/fix our FTP bash script ?
pg_dump: invalid option -- 'i'--ignore-version....A deprecated option that is now ignored.I se that I must to review this backup script.