You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The code serves as a suggestion. Everyone is free to improve the code. For example, you could choose a variant for data transmission that enables backup even over really poor Internet connections.
poor_mans_send_and_receive.sh
# [Nihon-Ryori](https://github.com/Nihon-Ryori)
# Open Source Code. Feel free to use the Code for bcachefs project or what ever.
# 2024-11-18, ver 001
# This untested code should do a Bcachefs snapshot and rsync, as "poor man's send and receive".
# Untested Code. Use the code at your own risk and only if you would write it yourself. The code is only intended for test use with a test system that does not contain any data that is still required.
#!/bin/bash
Echo "Create snapshot"
snapshot_id=$(date +%Y%m%d_%H%M%S)
bcachefs snapshot create $snapshot_id
Echo "Snapshot created"
Echo "Run syncronize"
rsync -avh --delete --hard-links /pfad/zum/Quellordner/ /pfad/zum/Zielordner/ \
--exclude-from=/pfad/exkludierte_dateien.txt \
--link-dest=/pfad/quellordner_snapshot_$snapshot_id
Echo "rsync finished"
# Delete Snapshot after syncronize"
bcachefs snapshot delete $snapshot_id
echo "poor man's send and receive completed."
echo "Press Enter to end the script"; read -r
The text was updated successfully, but these errors were encountered:
Nihon-Ryori
changed the title
Bcachefs, snapshot and rsync as "poor man's send and recive"
Bcachefs, snapshot and rsync as "poor man's send and receive"
Nov 18, 2024
The code serves as a suggestion. Everyone is free to improve the code. For example, you could choose a variant for data transmission that enables backup even over really poor Internet connections.
poor_mans_send_and_receive.sh
The text was updated successfully, but these errors were encountered: