Thanks for using Bitnami. We highly recommend you to do a server backup before doing any modification so you can restore it back if necessary. You can have more information about it at https://docs.bitnami.com/google/faq/administration/backup-restore-server/
Create a backup of your ERPNext site running the commands below. I suppose that you are doing a backup of another ERPNext instance in Google Cloud Platform
sudo bench backup --with-files
The command above will generate three files in the
/opt/bitnami/apps/erpnext/htdocs/frappe-bench/sites/erpnext/private/backups directory. Download all of them to your server.
In order to restore it, you need to:
Upload the generated files to the
/home/bitnami directory of your new server. You can have more information about it with our guide at https://docs.bitnami.com/google/apps/erpnext/administration/upload-files/
SSH connect to your Google Cloud Platform server and unzip the uploaded file with extension
.sql.gz. Remember to substitute the
Connect to the MySQL database manager. You can have more information about how to connect in our guide at https://docs.bitnami.com/google/apps/erpnext/get-started/connect-mysql/
Delete the current
bitnami_erpnext database in your server by running the command below into the MySQL console. Please note that this will delete any information present in your current ERPNext server.
DROP DATABASE bitnami_erpnext;
- Restore the unzipped
.sql file by running the commands below. Substitute the
[sql_filename] placeholder with the name of the unzipped file.
sudo bench restore /home/bitnami/[sql_filename]
- Extract files from the file named with
-files.tar at the end and copy them to the erpnext site location
mkdir -p extracted
tar -xf [files.tar_filename] -C extracted/
cp extracted/erpnext/public/files/* /opt/bitnami/apps/erpnext/htdocs/frappe-bench/sites/erpnext/public/files/
sudo ./bnconfig --userpassword YOUR_NEW_PASSWORD
- Restart services for changes to take effect and login. If you didn't change your password in the last step, then you will have to use the same application credentials you were using in the previous instance.
sudo /opt/bitnami/ctlscript.sh restart
Let us know if it worked for you.