Use rsnapshot for HA backup

Hello, I set rsnapshot to backup the entire directory home /, I start rsnapshot with cron from root. In the backup I get .homeassistant without yaml configuration files, only the deps and tts folders. Please tell me why yaml files were not transferred?

Is it possible that you somehow excluded *.yaml in your rsnapshot configuration?

I am using rsnapshot, too, and all yaml files come across into the backup just fine.

Check the rsnapshot mailing list.

In this and the problem, in default config, changed only the schedule of making copies and snapshot_root. Include and exclude did not change.
Could you show your config rsnapshot?

Sure. Here come the relevant parts - without the comments. Please keep in mind that when copy&pasting any lines, you will have to replace the whitespace between the config key (left) and the config entry with a tab character.
This is running fine on “Ubuntu 16.04.3 LTS” with “rsnaphot 1.4.2-1”.

# rsnapshot.conf

config_version  1.2

snapshot_root   /var/mnt/backup/snapshots

cmd_cp          /bin/cp
cmd_rm          /bin/rm
cmd_rsync       /usr/bin/rsync
cmd_ssh         /usr/bin/ssh
cmd_logger      /usr/bin/logger
cmd_du          /usr/bin/du
cmd_rsnapshot_diff      /usr/bin/rsnapshot-diff

retain  hourly  3
retain  daily   7
retain  weekly  4
retain  monthly 6

verbose         4
loglevel        3
logfile         /var/log/rsnapshot.log
lockfile        /var/run/rsnapshot.pid

rsync_long_args         --delete --numeric-ids --relative --delete-excluded --stats --no-human-readable
ssh_args                -o BatchMode=yes

exclude         .apdisk
exclude         .AppleDB/
exclude         .AppleDesktop/
exclude         .AppleDouble/
exclude         .DS_Store
exclude         .git/
exclude         .svn/
exclude         .synkron\.syncdb
exclude         .TemporaryItems/
exclude         "Network\ Trash\ Folder"/
exclude         "Temporary\ Items"/
exclude         Thumbs.db
exclude         Thumbs.dbi\:2fencryptable

backup  /opt/home-assistant/.homeassistant/     localhost/
backup  /opt/home-assistant/lib/python3.5/site-packages/libopenzwave-0.3.1-py3.5-linux-x86_64.egg/config/       localhost/

You’re running rsnapshot as root, so it can read all files?

Have you run it manually in test mode (-t) to see what it would do, or run it in very verbose (-V) mode, or even debug (-D) to see what it’s doing?

I start with /etc/cron.d/rsnapshot, cron also works as root?

00 3 *** root /usr/bin/rsnapshot daily
00 5 7 root /usr/bin/rsnapshot weekly
00 12 1
root /usr/bin/rsnapshot monthly

sudo rsnapshot -t daily
echo 321 > /var/run/rsnapshot.pid
/bin/cp -al /mnt/backup/daily.0
/mnt/backup/daily.1
/usr/bin/rsync -a --delete --numeric-ids --relative --delete-excluded
/home/ /mnt/backup/daily.0/localhost/
/usr/bin/rsync -a --delete --numeric-ids --relative --delete-excluded /etc/
/mnt/backup/daily.0/localhost/
/usr/bin/rsync -a --delete --numeric-ids --relative --delete-excluded
/usr/local/ /mnt/backup/daily.0/localhost/
touch /mnt/backup/daily.0/

I run manually sudo rsnapshot daily, a folder is created daily.0 and it does not have .yaml, and there are no files in the backup ~ / .ssh / where there should be ssh keys. I understand that there is not enough copying right?

I’d suggest the rsnapshot mailing lists as the best place to get help with rsnapshot.

However, your smallest interval is hourly, if you run anything else then it’s just a directory renaming process.

Remember that hourly, daily, weekly, and monthly are just tags - you don’t need to run them at those intervals.