I would like to be able to backup multiple users' history.dat files in their firefox profile folder. The file is found in:
The problem is that there are two variables that change in the file path on a per user basis. The first is the username and the second is the <random> part of the profile.
cp /home/*/.mozilla/firefox/*/history.dat /dest/directory
The above command seems to work fine with the wildcards, however it runs in to a problem after the first history.dat file gets backed and complains about overwriting the existing file. Obviously I can force the overwrite but that would leave me with only one file.
Is there any way I can append the username to the file and back it up through something like rsync to a NAS.
i.e. history.dat_user1, history.dat_user2
I would like to do this daily and overwrite the files so only the latest copy of the history file is archived.