Interesting info/help: http://www.mikerubel.org/computers/rsync_snapshots/
- Name: [backup_name].year.[YYYY]
- Done during december. Not 31/12, too late in case of problem. Let's say 10/12.
- command: cp -al [current] [YYYY backup]
- Check if dir exists before
- Name: [backup_name].month.[month_name]
- command: find path -name [backup_name].month.* --depth 1 --ctime +100 --exec rm {} ; && cp -al [current] [backup_name].month.[month_name]
- Name: [backup_name].week.{4..1}
- command: delete 4, move 3 to 4 ... 1 to 2, cp -al [backup_name] to 1
- Name: [backup_name]
- each process that asks for rw puts a lock with its PID
- each process that asks for ro removes its lock
- when there the last lock is removed, we can effectively remount ro => create functions / a lib to handle this.
Don't forget checks for dir [ -d xxx ] before trying to overwrite / cp / mv ...
- Semaphore:
- Semaphore 2.0: see https://herve.semaphoreci.com/projects/hardlinks-backup
- Travis: