Managing the onedrive service - skilion/onedrive GitHub Wiki
Managing the onedrive service
onedrive comes with a user-level systemd service to sync your files automatically.
Starting the service
systemctl --user start onedrive
Stopping the service
systemctl --user stop onedrive
Enabling the service
systemctl --user enable onedrive
Enabling the onedrive service will tell systemd to start it automatically at boot.
Note that by default systemd
will only keep user services running when a user has at least one active session open. To allow the service to run when you're not logged in, use:
# loginctl enable-linger YOURUSERNAME
Logs
To see the logs run:
journalctl --user-unit=onedrive -f
Note that unprivileged users can only view their user-specific log if the Storage
directive of the [Journal]
section of /etc/systemd/journald.conf
is set to persistent
(instead of auto
or volatile
). (More information: https://lists.freedesktop.org/archives/systemd-devel/2016-October/037554.html )
Saving the log to file
journalctl --user-unit onedrive -f > onedrive-log.txt &
journalctl notes
journaltcl can also filter messages with a variety of time formats with --since and --until options, which restrict the entries displayed to those after or before the given time, respectively. For absolute time values use the following format:
YYYY-MM-DD HH:MM:SS
If you want to check what happened at 3:00 PM until an 2 hour ago, you could type:
journalctl --user-unit onedrive --since 15:00 --until "2 hour ago"