Loading…
Loading…
For ERPNext 16 on bench. In Docker, run them inside the backend container.
bench --site erp.example.com backup --with-files
Files it writes to sites/erp.example.com/private/backups/
The date and time in each name are when the backup ran — shown here as an example.
Copies off the server
A backup on the same disk goes when the disk goes. Keep copies somewhere else, automatically.
Test a restore
Restore a backup on a spare machine now and then. It is the only proof the backup works.
Keep the key apart
If backups are encrypted, the key in site_config.json is the only way back in. Store it separately.
Run bench --site <site> backup --with-files. It writes the database, the public and private files and the site config to sites/<site>/private/backups unless you give another folder.
Run bench --site <site> restore with the database file, adding --with-public-files and --with-private-files for the two archives. If the backup is from an older version, run bench --site <site> migrate afterwards.
Not with bench restore — it refuses partial backups. They go back into an existing site with bench partial-restore.
Take a full backup with files on the old server, copy the files across, restore them on a bench with the same apps and the same or a newer version, run migrate, then point the domain at the new server.
Restoring needs the backup_encryption_key from the old site’s site_config.json, passed with --encryption-key when restoring into a different site. Keep a copy of the key away from the server.
We can set up offsite backups for your ERPNext and test that they restore, so a bad day is an inconvenience, not a crisis. Talk to a consultant.
or write to info@acube.co
Kochi (Kadavanthra & Infopark) · Thiruvananthapuram · across India & overseas · In business since 2011