link for the file showing difference between two archives
Backup of dec-12 was taken through cron while backup of dec-13 was taken by running the script manually.
And I haven't worked or added any new file between these two days. There were no changes in the files.
Script of Backup:-
#!/bin/bash
#typically the first line of the bash scripts
BACKUPTIME=date +%b-%d-%y
#get the current date
DESTINATION=/home2/wedevelo/backup/backup-$BACKUPTIME.tar.gz
TESTDESTINATION=/home2/wedevelo/backup/test/backup-$BACKUPTIME.tar.gz
SOURCEFOLDER=/home2/wedevelo/public_html/mdjewellers/
TESTSOURCEFOLDER=/home2/wedevelo/public_html/test/mdjewellers/
tar -zcpf $DESTINATION $SOURCEFOLDER #create the backup
tar -zcpf $TESTDESTINATION $TESTSOURCEFOLDER
Here is cron command.
MAILTO="info@wedevelop.in"
5 0 * * * /bin/bash /home2/wedevelo/backup_script.sh
I don't know what os is this as I'm using shared hosting of Bluehost.
ls -l file 1 file2
The file names in the screenshot don't match the script. The file size doesn't show what is different. List the contents of the backup files and check what is different. You can do this for example with commands like these:tar tzf backup-Dec-12-20.tar.gz > files12.txt
,tar tzf backup-Dec-13-20.tar.gz > files13.txt
,diff -uw files12.txt files13.txt
Show the output in the question. I suggest to save the error output to a file, e.g.tar -zcpf $DESTINATION $SOURCEFOLDER 2> /path/to/a_file
. – Bodo Dec 17 '20 at 13:50