I could use a hand migrating my instance of Zammad to a new server.
The original instance was built from source.
Zammad-Version: 4.0
Database: postgresql
Elasticsearch version: 7.12.1
I’ve prepared the new server with a working instance of Zammad using instructions from:
Zammad-Version: 4.0
Database: postgresql
Elasticsearch version: 7.12.1
I’m referencing the backup/restore docs at:
https://docs.zammad.org/en/latest/appendix/backup-and-restore.html
On the original machine, I ran:
cp /opt/zammad/contrib/backup/config.dist /opt/zammad/contrib/backup/config
and created the directory:
/var/tmp/zammad_backup
Then I changed directories to:
cd /opt/zammad/contrib/backup
and ran:
./zammad_backup.sh
This created 2 new files in /var/tmp/zammad_backup:
20210514171457_zammad_files.tar.gz
latest_zammad_files.tar.gz
On the new machine, I ran:
cp /opt/zammad/contrib/backup/config.dist /opt/zammad/contrib/backup/config
and created the directory:
/var/tmp/zammad_backup
Copied backup from old server to new server:
scp /var/tmp/zammad_backup/ root@newserver:/var/tmp/zammad_backup
Changed directory to:
cd /opt/zammad/contrib/backup
ran the restore script:
./zammad_restore.sh
At the prompt:
# Zammad restored started - Fri 14 May 2021 05:45:33 PM UTC!
The restore will delete your current config and database!
Be sure to have a backup available!
Enter 'yes' if you want to proceed!
Restore?:
I type yes
Enter file date to restore:
20210514171457
latest
File date:
I type:
20210514171457
Enter db date to restore:
DB date:
I type:
20210514171457
and I get an error:
File /var/tmp/zammad_backup/20210514171457_zammad_db.psql.gz does not exist!
Restore aborted!
As far as I can tell, the backup script isn’t creating a dump of the psql and I’m not sure how to proceed.
Thanks in advance for any help.
My database.yml from the Original machine looks like this:
# this is a database config sample for zammad ready to use with a postgresql db
# copy or symlink this file to config/database.yml to use it
default: &default
# For details on connection pooling, see Rails configuration guide
# http://guides.rubyonrails.org/configuring.html#database-pooling
pool: 50
timeout: 5000
encoding: utf8
##### postgresql config #####
adapter: postgresql
# username: zammad
# password:
# If the database server is not on localhost, you can set hostname and port:
# host:
# port:
#### mysql config #####
# adapter: mysql2
# username: zammad
# password: <Password>
# If the database server is not on localhost, you can set hostname and port:
# host:
# port:
production:
<<: *default
database: zammad_production
development:
<<: *default
database: zammad_development
# Warning: The database defined as "test" will be erased and
# re-generated from your development database when you run "rake".
# Do not set this db to the same as development or production.
test:
<<: *default
database: zammad_test
and the new database.yml looks like:
production:
adapter: postgresql
database: zammad
pool: 50
timeout: 5000
encoding: utf8
username: zammad
password: some_crazy_password