First lets understand that to take an incremental backup you need to keep full backup on the server where you are taking incremental.
Though you take a full backup on SERVER(A) you may push to AWSSERVER(B). It doesn't matter, but inorder to take an incremental you need to keep the full backup copy as source backup.
UPDATE
Below is the approach for incremental, you will be able to get your answers whether the idea you have is a feasible one or not.
- After Xtrabackup Full backup is done.
mkdir -p /backup/
innobackupex --defaults-file=/etc/my.cnf --user=mysql
--password=‘****’ /backup/
From here /backup/2017-06-01_18-01-52 full backup set is obtained.
- Take incremental backup with full backup.
mkdir -p /backup/INCR
innobackupex --defaults-file=/etc/my.cnf --user=mysql
--password=‘*****’ --incremental /backup/INCR --incremental-basedir=/backup/2017-06-01_18-01-52 --slave-info
From here /backup/INCR/2017-06-01_18-10-41/ incremental delta data is obtained.
- Merge the backups
innobackupex --defaults-file=/etc/my.cnf --user=mysql
--password=‘*****’ --apply-log-only /backup/2017-06-01_18-01-52/ --incremental-dir=/backup/INCR/2017-06-01_18-10-41/
From here /backup/2017-06-01_18-01-52/2017-06-01_18-22-29 Final backup set is merged to parent(FULL BACKUP) and created a sub directory out of it.
- Apply logs to Final Backup Set.
innobackupex --defaults-file=/etc/my.cnf --user=mysql
--password=‘*****’ --apply-log /backup/2017-06-01_18-01-52/2017-06-01_18-22-29
- Now this is your final data set : /backup/2017-06-01_18-01-52/2017-06-01_18-22-29/* , replace data dir to this data set -> Ensure every 1 to 4 steps had no errors and completed OK is found on all outputs. Test the result incremental backup data on a Test DB and Restore it to see if the server starts without any error messages
If your my.cnf is pointed to /mysql/data/
- service mysqld stop
- mv /mysql/data/* /tmp/MOVED/
- cp -r /backup/2017-06-01_18-01-52/2017-06-01_18-22-29/* /mysql/data/
- chown -R mysql:mysql /mysql/data/
- chmod -R 775 /mysql/data/
- service mysqld start
- Login to mysql
Check error log and do few select queries .