You are not logged in.

#1 2015-10-25 09:40:07

medicineman25
Member
Registered: 2014-12-03
Posts: 110

Syncing Arch Laptop With A Backup Desktop

Hey guys,

Been a little while since I've been on here. Not really sure if the newbie corner is the place for this question. Just let me know and I can move it to the appropriate section.

Anyways, here is the story: I am commencing work as an AV systems administrator. Won't go into the architecture of it all, but needless to say I will be running an arch system on a lappy and virtualising Windows etc. to remotely admin the various AMX, BBS and dynalite systems. I really hate windoze. But I digress.

This is post is not about virtualisation. I really need a way to create a constant backup from my lappy to a desktop machine. Something that can be iteratively restored to my lappy (with backdated images stored on the desktop [and another secondary remote backup, of course]). A system where the information can also be accessed and manipulated from my desktop and 'synced' back to the lappy on command (or at timed intervals).

I am not sure as to the depth of this system and just how much work would be involved, however I would be very grateful if someone here with knowledge on this topic could point me in the right direction. Even a few keywords would be helpful. I am a google ninja and puzzles are my thing, but I don't even know where to start with this one.

Thanks again guys.

Offline

#2 2015-10-25 10:44:26

medicineman25
Member
Registered: 2014-12-03
Posts: 110

Re: Syncing Arch Laptop With A Backup Desktop

I think I found the answer with rsync. Any confirmation, tips or links to an existing project in order to gain some further insight would still be appreciated.

Cheers guys!!

Offline

#3 2015-10-25 15:47:26

ewaller
Administrator
From: Pasadena, CA
Registered: 2009-07-13
Posts: 19,804

Re: Syncing Arch Laptop With A Backup Desktop

rsysnc is an excellent choice.   You way also want to investigate syncthing


Nothing is too wonderful to be true, if it be consistent with the laws of nature -- Michael Faraday
Sometimes it is the people no one can imagine anything of who do the things no one can imagine. -- Alan Turing
---
How to Ask Questions the Smart Way

Offline

#4 2015-10-28 06:51:51

medicineman25
Member
Registered: 2014-12-03
Posts: 110

Re: Syncing Arch Laptop With A Backup Desktop

thanks ewaller. a great suggestion!

Offline

#5 2015-10-31 06:23:12

boban_dj
Member
Registered: 2015-03-17
Posts: 150

Re: Syncing Arch Laptop With A Backup Desktop

I use bsync with a custom script, mainly backup of dirs and files from various locations, which I constantly edit.
The server hosts the exact dir structure as on all local machines (laptop,desktop-home, desktop-office), so I have it always available
The custom script (with alias in .bashrc) traverses through my dirs, then bsyncs with ssh.
Here is the bync url: https://github.com/dooblem/bsync
bsync has some nice features like asking what to backup when you mess up.

my custom script, from which I removed the names and paths, but I guess you get the point, goes like this:

# Colors
#Reset
Color_Off='\033[0m'       # Text Reset

# Bold
BGreen='\033[1;32m'       # Green
BYellow='\033[1;33m'      # Yellow

# Bold High Intensity
BIGreen='\033[1;92m'      # Green
BIYellow='\033[1;93m'     # Yellow


# You can change the uppercased items accordingly
# Source dirs
src_dir=/YOUR/DIRS/FILES

# Source the bsync script
bsync=~/Scripts/bsync.py

# Server bsync
src_dir_bsync=/LOCAL/DESTINATION
dest_dir_bsync=/SERVER/DESTINATION


# First bsync, improved version with rsync bidirectional
$bsync "-p 4000" "$src_dir_bsync" USER@SERVER_ADRESS.COM:"$dest_dir_bsync"

# Start up message
echo -e "$BYellow First, I will bsync with the server... $Color_Off"

# Traversing through all my dirs for backup start with "book_" that is why this part.
# In here I do some custom scripting that i left out (generating html from markdown)

find "$src_dir" -mindepth 1 -maxdepth 1 -type d -name 'book*'|
while read D;
	do cd $D;
		$ DO SOME CUSTOM THINGS;
done

# Second bsync, this works perfect for me since the changes made locally are bsyncd again with the server
$bsync "-p 4000" "$src_dir_bsync" USER@SERVER_ADRESS.COM:"$dest_dir_bsync"


# colored output message
echo -e "$BIGreen All files synced $Color_Off"

Last edited by boban_dj (2015-10-31 06:39:12)

Offline

Board footer

Powered by FluxBB