https://github.com/wdhif/meteor-script-backup
Easy backup script for Meteor App
https://github.com/wdhif/meteor-script-backup
backup meteor meteor-script-backup restore
Last synced: about 1 month ago
JSON representation
Easy backup script for Meteor App
- Host: GitHub
- URL: https://github.com/wdhif/meteor-script-backup
- Owner: wdhif
- License: apache-2.0
- Created: 2015-12-11T14:30:37.000Z (over 9 years ago)
- Default Branch: master
- Last Pushed: 2016-08-02T11:48:00.000Z (almost 9 years ago)
- Last Synced: 2025-04-25T00:15:49.841Z (about 1 month ago)
- Topics: backup, meteor, meteor-script-backup, restore
- Language: Shell
- Homepage:
- Size: 8.79 KB
- Stars: 5
- Watchers: 2
- Forks: 3
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# meteor-script-backup
Easy backup script for Meteor App## Installation
1. Create a backup directory where you want to store your backup. EG. `/backup`
2. Change the variable of the script to your liking.
- `dbName` is the name of the MongoDB base.
- `cfsLoc` is the location of your CFS directory if needed.
- `curdate` is the date command format you want to use.
- `backupLoc` is the directory you've created to store your backup.
3. Set a cron to run the script when you want. EG.`0 2 * * 0 sh /backup/backup.sh >> /backup/logs 2>&1` for every monday at 2:00 AM.
4. You should REALLY add a SCP or any other way to extract your backup from the server
## Manual Backup
If your backup are store in `/backup`, as **root**, run the following command:
`sh /backup/backup.sh >> /backup/logs 2>&1`
## Manual Restore
If your backup are store in `/backup`, as root, run the following commands where 11-11-11 is the backup date:- `tar -xf mongo-11-11-11.tar.gz -C mongo-11-11-11`
- `mongorestore --dir mongo-11-11-11`
- `tar -xf cfs-11-11-11.tar.gz -C cfs-11-11-11`
- `cp -r cfs-11-11-11 /opt/mywebsite/cfs`
- `rm -r mongo-11-11-11 cfs-11-11-11`To restore in dev environment :
- `mongorestore --dir mongo-11-11-11/SITENAME -h IPADDRESS --port PORT -d DATABASENAME`