While automatic Backup just works only once after creation for me (see https://forum.sailfishos.org/t/automatic-daily-backup-only-works-once-after-creation/15563).
My question is:
Is there a Backup-Shellscript deep in one of the several Directorys of the System which i can trigger with Situations to get the automatically System-Backup-Solution back?
I don’t want to go to settings everyday to trigger that by the button by hand.
From inspecting /usr/lib64/qt5/qml/Sailfish/Vault/BackupRestoreProgressItem.qml
, that should be possible using DBus:
- Service:
org.sailfishos.backup
- Path:
/sailfishbackup
- Interface:
org.sailfishos.backup
… calling the methods "backupToCloud", [accountId]
or "backupToFile", [filePath]
.
See also: busctl --user introspect org.sailfishos.backup "/sailfishbackup"
I haven’t tried this though because I hate playing around with dbus on the shell, as its designers intended.
1 Like
Yes I have 
So in case you want to trigger a cloud backup, first find out the accountId
:
devel-su -p ag-tool list-accounts
This will look something like:
ID Provider Name
-- -------- ----
3 google GMail
2 nextcloud NC
1 jolla nephros
nextcloud
can do backups so the accountId
to use is 2.
You can check this by doing the following an looking for the storage
service:
devel-su -p ag-tool list-services 2
Service type Service name
------------ ------------
storage nextcloud-backup
posts nextcloud-posts
sharing nextcloud-sharing
sync nextcloud-images
caldav nextcloud-caldav
carddav nextcloud-carddav
To trigger the backup use
devel-su -p busctl call --user org.sailfishos.backup "/sailfishbackup" org.sailfishos.backup backupToCloud i 2
Note the -p
parameter to devel-su
for the commands. That will elevate your user to “privileged” level, but not root.
Unfortunately this will also make it hard to use from a script, like Situations would require.
busctl
wants the argument formatted as (in this case) “type value”, hence i 2
. Other dbus cli tools (like dbus-send
or Python) will use a different calling convention.
5 Likes
Damn and I had just set up rclone for this 
Shall i see some feedback after executing this in the terminal? Or can i somehow observe the backup progress? I try this to execute a backup from a device with broken screen…
And for the records:
devel-su -p busctl call --user org.sailfishos.backup "/sailfishbackup" org.sailfishos.backup backupToFile s /home/defaultuser/backup.tar
issues a local backup, that can be fetched with ssh from the device.
2 Likes
I wonder if the original question actually is solved. The question was regarding if there is a way to trigger Situations to get the automatically System-Backup-Solution.
As I understand it right @nephros suggested solution that triggers the backup but doesn’t work well with Situations.
So if I understand it right the question remains, how to automatically trigger a cloud-backup with Situations? Or do I miss something here?