View Single Post
Posts: 70 | Thanked: 68 times | Joined on Jan 2013
#7
To backup the whole N9 I use the following technique (linux/mac with terminal):

1) Plug your N9 to your computer
2) Put it in SDK mode (while already in dev mode of course)
3) Open SDK Connectivity App and look at the IP address and generated Password
4) Enter the following command in term on the **computer** :

ssh developer@192.168.2.15 "tar cvzp - --exclude='/proc' --exclude='/lost+found' --exclude='/sys' --exclude='/mnt' --exclude='/media' --exclude='/dev' /" | cat > /local/path/backup.tar.gz
Where 192.168.2.15 is the n9 IP. Then you'll have to enter the generated password and let the process happen.

To restore the backup, use this command instead (with same process) :

tar -xvpzf /local/path/backup.tar.gz | ssh developer@192.168.2.15 "cat > /"
Never tried the restore function, but theorically it should do the trick. If someone want to improve those commands, he is welcome. For instance I'm not sure that the "exclude" commands are taken into account since I read that "tar" needs an "x" for that, but I didn't know where to put it.

Anyway, that how I do it and it works for me

EDIT: As it turns out Tar and GNU Tar are not working the same way. So the command line shown above is right (or so it seems) but on mac os (not-GNU Tar) for instance you'll have to put the source path (in this case "/") **before** the --exclude functions, right after the "-", or the excluded paths will not be taken into account.

Last edited by sandy_locke; 2013-01-15 at 02:55.