update backup and restore.

This commit is contained in:
Nawaz Dhandala 2021-04-08 19:04:39 +01:00
parent 9cd1ce8495
commit 4d7e727190
4 changed files with 19 additions and 4 deletions

View File

@ -48,3 +48,18 @@ bash install.sh
The cron job should be installed and will run once/day!
# Restore Fyipe Database
**Step 1**: Copy restore.sh to root directory.
```
vi restore.sh
# Copy the file contents.
```
**Step 2**: Run the restore command
```
bash restore.sh -f <FILENAME>.archive
```
**Step 3**: This will copy the file from the VM to remote machine and run the restore.

View File

@ -10,7 +10,7 @@ FYIPE_DB_PASSWORD='password'
FYIPE_DB_NAME='fyipedb'
CURRENT_DATE=$(date +%s)
CURRENT_USER=$(whoami)
BACKUP_PATH=~/Documents/backup
BACKUP_PATH=~/db-backup
BACKUP_RETAIN_DAYS=14
TODAY=`date +"%d%b%Y"`

View File

@ -86,7 +86,7 @@ Requires=backup.service
[Timer]
Unit=backup.service
OnCalendar=*-*-* 00,12:00:00
OnCalendar=*-*-* 12:00:00
Persistent=true
[Install]

View File

@ -13,8 +13,8 @@ FYIPE_DB_PASSWORD='password'
FYIPE_DB_NAME='fyipedb'
CURRENT_DATE=$(date +%s)
CURRENT_USER=$(whoami)
FILE_NAME="fyipe-backup-1613551425"
FILE_PATH="/Users/${CURRENT_USER}/Documents/backup"
FILE_NAME="restore-file.archive"
FILE_PATH="/$CURRENT_USER/db-backup"
TODAY=`date +"%d%b%Y"`
function HELP (){