Monitoring the Timeshift program via the terminal
Sept 1, 2021 22:38:39 GMT
oblio and kev392 like this
Post by chour on Sept 1, 2021 22:38:39 GMT
It is assumed that the program is installed and configured to periodically create snapshots of the system state.
1. Make entries in a hidden file ./bash_history:
The first line
sudo timeshift --list
he second line
sudo timeshift --delete
the third line
sudo timeshift --check
2. Add it to a hidden file .bashrc( or to the ./bash_aliases file) the following line(one line!):
alias tsl='cd /home/username; (date; sudo timeshift --list; echo ===============================)>>mytimeshift'
(change username to the real user's name)
and another one:
alias tsn='leafpad /etc/timeshift.json'
Explanation of the alias
alias tsn='leafpad /etc/timeshift.json' # view the Time-shift settings. Specify which text editor is used and the path to the settings file.
Note: since version 20.11, the timeshift settings are located in a file at /etc/timeshift/timeshift.json, not in the /etc/timeshift file.json, as it was in earlier versions.
How it works
Open the Terminology and enter:
!1 +Enter
you will receive up-to-date Timeshift information in the terminal: snapshots and their characteristics, the amount of free space(or lack thereof), information about the place where the snapshots are saved.
Enter:
!2 +Enter
and you can choose the number of the snapshot to delete by selecting it from the list. Just enter it (for example, 0 or 1, or 4 at once), press Enter and the snapshot will be deleted.
Enter:
!3 +Enter
and the program will forcibly (urgently, immediately) create a snapshot of the system in accordance with your settings.
Enter in the terminal:
tsl +Enter
and a mytimeshift text file will be created, where you can see the current information on the images. This is an incremental (augmented) file, and when the tsl is started again, the information will be appended to the end of the file. This is the time-history
of the Timeshift program.
Enter:
tsn +Enter
to view the settings file(read-only)
1. Make entries in a hidden file ./bash_history:
The first line
sudo timeshift --list
he second line
sudo timeshift --delete
the third line
sudo timeshift --check
2. Add it to a hidden file .bashrc( or to the ./bash_aliases file) the following line(one line!):
alias tsl='cd /home/username; (date; sudo timeshift --list; echo ===============================)>>mytimeshift'
(change username to the real user's name)
and another one:
alias tsn='leafpad /etc/timeshift.json'
Explanation of the alias
alias tsn='leafpad /etc/timeshift.json' # view the Time-shift settings. Specify which text editor is used and the path to the settings file.
Note: since version 20.11, the timeshift settings are located in a file at /etc/timeshift/timeshift.json, not in the /etc/timeshift file.json, as it was in earlier versions.
How it works
Open the Terminology and enter:
!1 +Enter
you will receive up-to-date Timeshift information in the terminal: snapshots and their characteristics, the amount of free space(or lack thereof), information about the place where the snapshots are saved.
Enter:
!2 +Enter
and you can choose the number of the snapshot to delete by selecting it from the list. Just enter it (for example, 0 or 1, or 4 at once), press Enter and the snapshot will be deleted.
Enter:
!3 +Enter
and the program will forcibly (urgently, immediately) create a snapshot of the system in accordance with your settings.
Enter in the terminal:
tsl +Enter
and a mytimeshift text file will be created, where you can see the current information on the images. This is an incremental (augmented) file, and when the tsl is started again, the information will be appended to the end of the file. This is the time-history

Enter:
tsn +Enter
to view the settings file(read-only)