Forum
  • Search
  • Member List
  • Calendar
Hello There, Guest! Login Register — Login with Facebook

Sync root filesystem
Thank you for your donation

Post Reply 
 
Thread Rating:
  • 0 Votes - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Threaded Mode | Linear Mode
Sync root filesystem
4th Aug, 2014, 07:01 PM
Post: #1
rlogiacco Offline
Registered
Posts: 22
Joined: Jul 2014
Reputation: 0
Sync root filesystem
I have a root filesystem on a USB hard drive (btrfs) and I wish to keep it synched with the root fs on my SD card so to have a fully functional and always up to date fallback root. I'm new to btrfs, but for what I understaood it is somehow similar to a normal ext3/4 filesystem with an intrinsic ability to chroot: this way you can have snapshots by copy.
If my understanding is not too far from reality, I believe I can keep the two filesystems in sync by using rsync from the USB drive current root to the SD card current root without bothering moving over the snapshots (to save space and write access to the SD card).

The idea is to cron schedule something like the following:

Code:
mount /dev/mmcblk0p1 /mnt/sd-root-fs
rsync -aAHXv --delete /* /mnt/sd-root-fs/@root --exclude={"/boot/*","/dev/*","/proc/*","/sys/*","/tmp/*","/run/*","/mnt/*","/media/*",/lost+found}
umount /mnt/sd-root-fs

Will that work? Am I completely misunderstanding btrfs?
Find all posts by this user
Quote this message in a reply
« Next Oldest | Next Newest »
Post Reply 


Messages In This Thread
Sync root filesystem - rlogiacco - 4th Aug, 2014 07:01 PM
RE: Sync root filesystem - CurlyMo - 4th Aug, 2014, 08:08 PM
RE: Sync root filesystem - rlogiacco - 5th Aug, 2014, 12:09 AM

  • View a Printable Version
  • Send this Thread to a Friend
  • Subscribe to this thread
Forum Jump:

Current time: 30th May, 2025, 06:42 PM Powered By MyBB, © 2002-2025 MyBB Group.