We have moved to a new Sailfish OS Forum. Please start new discussions there.
9

Backup from command line [answered]

asked 2015-04-25 16:42:54 +0200

Bernte gravatar image

updated 2018-12-03 20:11:08 +0200

Tanghus gravatar image

Is there a way to trigger a backup from the command line? That way I could setup a cron job that checks if I am at my home network, does the backup and git pushes the data to my server at home.

Just to clarify: I mean the built-in backup utility under 'Settings'.

edit retag flag offensive reopen delete

The question has been closed for the following reason "the question is answered, an answer was accepted" by molan
close date 2017-11-02 17:36:27.595312

Comments

when you are gitting at home why don't you just let your server check for availability and do backups?

chemist ( 2015-04-25 17:31:41 +0200 )edit

I would like to rely on Jolla's backup infrastructure instead of just rsyncing my home folder. I am not sure that rsyncing the home folder does actually save everything, also I am not sure what the proper restore procedure is. The backup infrastructure is based on GIT and thus makes syncing and versioning of the data very easy. The only piece missing in the puzzle is the ability to backup without the GUI.

Bernte ( 2015-04-26 02:01:26 +0200 )edit
1

IMO everything possible in the GUI should be possible (automated, scriptable) in the terminal emulator/shell. That would not reduce the validity of questions like this but they might change from can I ... ? and why can't I ... ? to how do I ... ?

rdmo ( 2015-04-26 14:20:58 +0200 )edit
1

I said "at home" not "your ~/", you make a remote connection and can trigger everything on the jolla shell, don't you? You can invoke vault from shell, also you can tar and even git. With ssh nemo@jolla 'bash -s' < yourscript.shyou can even run a script from your desktop remotely. First of all you want something like described here for a daily backup routine https://together.jolla.com/question/16434/cronjob-on-sailfish/?answer=43375#post-id-43375 if you put a script that tars everything nicely you can just have your desktop check if your jolla is there every minute and pull the tar file.

chemist ( 2015-04-26 15:08:53 +0200 )edit

I fully understood your point, my point was about rsync my home folder vs. using the backup utility. The question whether I trigger it from a cron job on my home box or a cron job on my Jolla is not my problem. My question is: "Is there a way to trigger a backup from the command line?" (the build in Backup utility you find under Settings) - everything else was just explanation of why I wanted it.

Bernte ( 2015-04-26 15:31:10 +0200 )edit

1 Answer

Sort by » oldest newest most voted
8

answered 2015-04-26 22:19:53 +0200

Bernte gravatar image

updated 2016-11-30 16:07:42 +0200

chemist gravatar image

Not sure why chemist (thanks again) did not post it as a proper answer, so I am copying his information:

Backup is done using a command line tool called 'vault' that is available on the command line. The URL for the tool is https://git.merproject.org/mer-core/vault

The GUI under settings is a wrapper for it.

edit flag offensive delete publish link more

Comments

Hi there.

Would you be able to explain a little further how to use vault at the command line? My code-fu is not at the level that I have been able to decipher this yet. I have a 'phone with a broken screen and I want to backup and transfer to my new Aquafish..

Thanks in advance.

Antti Branninen ( 2016-11-30 14:11:46 +0200 )edit

I guess contacts is the most important thing to export, devel-su -p vcardconverter -e <pathto.vcf>

chemist ( 2016-11-30 16:09:39 +0200 )edit

Hey, thanks. I got the constituent parts of the backup, but I was more wondering if there was a way to tie it all together (contacts, messages etc) via the inbuilt backup process..

Antti Branninen ( 2016-11-30 16:12:53 +0200 )edit

There is, just noone but the developers really know how it works. When this question came up I wasted some hours in figuring out how it works... gave up on it.

chemist ( 2016-11-30 17:51:21 +0200 )edit

Question tools

Follow
5 followers

Stats

Asked: 2015-04-25 16:42:54 +0200

Seen: 1,456 times

Last updated: Nov 30 '16