Code:
root@Washington:/var/SNAPSHOTS # uname -a
FreeBSD Washington.XXXXXXXXX.XXX 10.1-RELEASE FreeBSD 10.1-RELEASE #0 r274401: Tue Nov 11 21:02:49 UTC 2014 root@releng1.nyi.freebsd.org:/usr/obj/usr/src/sys/GENERIC amd64
Code:
root@Washington:/var/SNAPSHOTS # bash -version
GNU bash, version 4.3.42(0)-release (amd64-portbld-freebsd10.1)
Copyright (C) 2013 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software; you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.
I have a nightly backup routine that creates a tarball and makes a copy to a backup server, deleting the oldest copy to maintain no more than 7 local, and 10 on the backup server. The backup server, about 2 hours later searches for and uploads the newest tarball to a remote server for offsite.
Everything was running flawlessly for some time until after the new year.
I ran the script in debug mode (set +x) and got the line which is:
Code:
++ su liberty.roofing -c 'ssh 192.168.1.20 ls -U /usr/home/liberty.roofing/SNAPSHOTS | grep -v log | head -n1'
+ oldfile=snap_Washington_01-03-16.tar.gz
That variable is supposed to be the OLDFILE, yet it is reporting the latest file...
When I run that line from shell on the machine I get a different answer, which is what it should be reporting, and HAD been reporting till the new year.
Code:
root@Washington:/var/SNAPSHOTS # su liberty.roofing -c 'ssh 192.168.1.20 ls -U /usr/home/liberty.roofing/SNAPSHOTS | grep -v log | head -n1'
snap_Washington_12-22-15.tar.gz
Not sure what is going on here. Anyone have any suggestions?