Open k1m0ch1 opened 5 months ago
Main reason to backup the database because the sqlite if not closed while is being used will makes the file corrupt, so backup is like precaution if the database fail to store.
The script to backup is pretty simple, it looks like this
#!/bin/bash timestamp=$(date +%Y%m%d_%H%M%S) cd /root/ cp crawl.db /root/workspace/indiemart/backup-indiemart/crawl.db.$timestamp cp indiemart.db /root/workspace/indiemart/backup-indiemart/indiemart.db.$timestamp
and the backup will be running following this crontab rule
now the problem it will makes the server full with storage, there is two option:
update: I made it like this:
at least it will always delete 5 days ago
Main reason to backup the database because the sqlite if not closed while is being used will makes the file corrupt, so backup is like precaution if the database fail to store.
The script to backup is pretty simple, it looks like this
and the backup will be running following this crontab rule
now the problem it will makes the server full with storage, there is two option: