Incremental backup and strftime

Hello!

I am setting up the backups of hosted domains and have a question.

If I make a daily backup that is saved to /backups/%d-%m-%y
The first backup is a FULL one.
Then if I make incremental backups, every day they will be saved in another directory.

Will it work like this? The point is that HOW the system will know what the previous full backup contains, as it is in another directory?

Or must I do all (full then incremental ones) to the same directory?

Thank you!

That’s actually a good question. I suspect you’d want them in same the dir. Give it a try for a few days and let us know. :slight_smile:

I do mine as daily full backups in a %y/%m directory. Also note that %y-%m-%d sorts better when you do ‘ls’.

Assuming they are in the same dir:
I have the domain.com.tar.gz that is the initial full backup.
What will be the name of the incremental file?
What will be the directory content be after the 1st then 2nd incremental backups?

Well there is something strange…
I made a FULL backup to a directory,
then I made incremental backup to the same directory (no date, just the dir name, fixed).
The incremental backup files are named the same than the full ones, and so erased them; finally I have only the incremental files in my directory, initial (full) are gone!!!

I’m not 100% sure on this but I think incremental vs full files are distinguished using their last modified time. Meaning incremental files are only those changed since the last full backup was done. It doesn’t actually look at the last full backup to see what files are there.

I have always put full and incremental in different dated folders and had no problems.

Well, so after 2 incremental backups, no problem: One directory by day, and all is correct :slight_smile: