Is There A Smarter Way To Sync/backup Android Folders?


yoshm

Recommended Posts

I see in this post: http://forum.bittorrent.com/topic/17728-sync-your-windows-profile-the-smart-way/

is described a fairly nifty way to set up a directory of links (or junctions) to the various folders to sync. Then you can have BTSync just sync that "meta-directory" and all the linked directories get handled. This is a sort of kludged way to create a manageable "Include List" for BTSync.

 

My question: is there a similar "trick" for Android? I have a dozen or so folders to backup and I'd prefer to make it easier to manage the lot with a single collection and a single "secret".

 

Thanks,
Yosh

 

Link to post
Share on other sites
  • 1 month later...

You can use bind mounts, but I think that requires root access. Here is a short script that I ran at boot via Universal init.d:

#!/system/bin/sh# http://www.technohunk.com/2013/02/how-to-execute-a-command-at-boot-android/# Use with Universal init.d# Place at /system/etc/init.d/clockworkmod-mountmkdir -p /clockworkmount -o bind /mnt/shell/emulated/clockworkmod /clockwork

This makes an otherwise hidden directory visible to BitTorrent sync so I can replicate my ClockworkMod Recovery backups on my Nook tablet to peer devices for backup.

 

If you wanted to link in other content you could do something like this:

mkdir /BitSyncmkdir /BitSync/clockworkmkdir /BitSync/Downloadsmkdir /BitSync/backupsmount -o bind /mnt/shell/emulated/clockworkmod /BitSync/clockworkmount -o bind /sdcard/Download /BitSync/Downloadmount -o bind /sdcard/backups /BitSync/backups

There is probably a better way, but that's the approach that based on my current knowledge I would use on an Android device.

Link to post
Share on other sites
  • 10 months later...

Thanks, @deoren. Somehow, I missed your post when you made it...  Have you verified that this works?

 

FYI,  I recently corresponded with BT about this topic. Here is what they told me:

Sync on Windows indeed syncs junctions as regular folders, but it doesn't work for 'nix (Linux and Unix, Android is linux as well) platforms. Their symlinks are created in a pretty special way, so that they are just pointers (to put it simply, like shortcuts on Windows). So they are recognized and synced as files, and thus make no sense, especially when syncing across platforms.

We are still looking for a best way to make 'nix links work. Thank you!

Link to post
Share on other sites

Thanks, @deoren. Somehow, I missed your post when you made it...  Have you verified that this works?

 

It does for me, but my purposes may be fairly simple. I primarily backup/mirror loose files kept within the local "sdcard" and Nandroid backups (TWRP, clockworkmod) which are basically tarball archives. My assumption would be that the tarballs keep up with symbolic links and anything UNIX specific. To BitTorrent Sync the tarballs are just regular files.

 

I have root access on both devices where I use the approach, so I'm not really tested with other setups. Does that answer your question?

Link to post
Share on other sites

Archived

This topic is now archived and is closed to further replies.