hello,
I want to change the filenames of local backup, I am unable to identify except of date associated with it.
I have tried to checked in script, /usr/local/nagiosxi/scripts/backup_xi.sh, but could not get much from in it.
Kindly guide.
Thank you!
Local backup filename changed
Re: Local backup filename changed
The name is actually based off the time in unix, so to see the furthest backup you have I would look at the lowest number. If you'd like to modify it, this is the part that does the naming -
Otherwise, you can always rename your backups after running the script. mv /store/backups/nagiosxi/#######.tar.gz /store/backups/nagiosxi/yourname.tar.gz
Code: Select all
#############################
# SET THE NAME & TIME
#############################
name=$fullname
if [ -z $fullname ]; then
name=$prepend$ts$append
fi
# Get current Unix timestamp as name
if [ -z $name ]; then
name=$ts
fi
# My working directory
mydir=$rootdir/$name
Former Nagios Employee
Re: Local backup filename changed
Thank you!
Can I modify my filename with date, I do have a backup file after every 24 hours, so it will be easy for me to check and by filename.
e.g
24092016.tar.gz
Can I modify my filename with date, I do have a backup file after every 24 hours, so it will be easy for me to check and by filename.
e.g
24092016.tar.gz
Re: Local backup filename changed
This could lead to issue down the road if multiple backups are taken the same day, which is why we used the unix time.
I would leave it as is, or modify it to your needs - but, further modification to the backup script isn't something we can support.
I would leave it as is, or modify it to your needs - but, further modification to the backup script isn't something we can support.
Former Nagios Employee
Re: Local backup filename changed
As per you, file is created with univ time, but my files are created as follows.
Can you please explain its format.
Thank you!
Can you please explain its format.
Thank you!
You do not have the required permissions to view the files attached to this post.
Re: Local backup filename changed
See this link for more of an explanation about the unix time stamp - http://www.unixtimestamp.com
Former Nagios Employee