LinuxQuestions.org
Help answer threads with 0 replies.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 03-10-2017, 01:16 PM   #1
Orthoducks
LQ Newbie
 
Registered: Mar 2017
Posts: 10

Rep: Reputation: Disabled
TimeShift from the command line?


I'm looking for a backup solution for Ubuntu -- primarily for system integrity, not data backup -- and the solution that looks best to me is TimeShift.

But I'm concerned that it uses a GUI. I know it has a command line interface too, but some of the descriptions I found seem to imply that the command line interface is just a way of starting it from a terminal window, and it still uses the GUI.

When I need to do a restore I may be in recovery mode because the desktop won't load. If the problem that requires a restore prevents me from running the program that does the restore, the program isn't useful to me.

What's the deal here? Can TimeShift run without a GUI environment?
 
Old 03-10-2017, 01:30 PM   #2
hydrurga
LQ Guru
 
Registered: Nov 2008
Location: Pictland
Distribution: Linux Mint 21 MATE
Posts: 8,048
Blog Entries: 5

Rep: Reputation: 2925Reputation: 2925Reputation: 2925Reputation: 2925Reputation: 2925Reputation: 2925Reputation: 2925Reputation: 2925Reputation: 2925Reputation: 2925Reputation: 2925
There's an image of the available commands on this page:

http://www.teejeetech.in/2015/01/tim...mmandline.html

Looks pretty good to me.
 
Old 08-21-2021, 12:54 AM   #3
flos
Member
 
Registered: Feb 2009
Location: Shropshire, UK
Distribution: Mint
Posts: 30

Rep: Reputation: 2
Use man page

The link given above has expired.
Use
man timeshift > timeshift_man.txt
then use a text editor to view the text file.
 
Old 08-21-2021, 03:23 AM   #4
captain_sensible
Member
 
Registered: Apr 2010
Posts: 352

Rep: Reputation: 145Reputation: 145
Click image for larger version

Name:	Timeshift.jpg
Views:	46
Size:	141.2 KB
ID:	36992i'm on Arch and got Timeshift from AUR
I only use command line

I use for TimeShift backup an SD card it has 32gig space.

When i want to make back up ,i insert card then from command line :

sudo timeshift --list

//that gives me output of snapshots I have

I usually just keep 2 and get rid of oldest before adding latest.

So i just type:


sudo timeshift --delete


//i use no flags , timeshift then presents my list and asks me to enter a number of timeshift snapshot to delete its either 0 or 1 for me since i only keep 2

then to create:

sudo timeshift --create --comments " pre kernel 5.13.12"




I used timeshift about a week ago ; i had run composer with root permissions ( not a good thing to do) it messed up some config files in a web dev. I ran timeshift using latest snapshot worked a treat !

Last edited by captain_sensible; 08-21-2021 at 03:27 AM.
 
1 members found this post helpful.
Old 08-21-2021, 11:49 PM   #5
flos
Member
 
Registered: Feb 2009
Location: Shropshire, UK
Distribution: Mint
Posts: 30

Rep: Reputation: 2
Useful tips -thanks!
 
Old 08-23-2021, 06:27 AM   #6
captain_sensible
Member
 
Registered: Apr 2010
Posts: 352

Rep: Reputation: 145Reputation: 145
there is some setting up to do; which i did using the GUI . You have to tell Timeshift where snapshots will go. Also daily is probably excessive and will result in bulky storage . Each snap shot for me is Circa 6gig

I've disabled auto snapshots and go for manual, creating a snapshot when appropriate maybe when i run

sudo pacman -Syu and see there is a new kernel and header, which might create a problem i create a snapshot before proceeding with the download and install also if i've done something with web dev

By the way if its a "minor glitch" and your laptop boots up , you use TimeShift installed on your laptop.
If your laptop won't boot i believe you can use Timeshift on a live Linux usb and still make use of the stored snapshot
 
Old 08-23-2021, 06:34 AM   #7
syg00
LQ Veteran
 
Registered: Aug 2003
Location: Australia
Distribution: Lots ...
Posts: 21,126

Rep: Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120
There used to be good doco online - including CLI instructions. Have a read of this thread elsewhere.
 
Old 08-23-2021, 12:32 PM   #8
captain_sensible
Member
 
Registered: Apr 2010
Posts: 352

Rep: Reputation: 145Reputation: 145
Timeshift v19.08 by Tony George (teejeetech@gmail.com)

Syntax:

timeshift ‐‐check
timeshift ‐‐create [OPTIONS]
timeshift ‐‐restore [OPTIONS]
timeshift ‐‐delete‐[all] [OPTIONS]
timeshift ‐‐list‐{snapshots|devices} [OPTIONS]

Options:

List:
‐‐list[‐snapshots] List snapshots
‐‐list‐devices List devices

Backup:
‐‐check Create snapshot if scheduled
‐‐create Create snapshot (even if not sched‐
uled)
‐‐comments <string> Set snapshot description
‐‐tags {O,B,H,D,W,M} Add tags to snapshot (default: O)

Restore:
‐‐restore Restore snapshot
‐‐clone Clone current system
‐‐snapshot <name> Specify snapshot to restore
‐‐target[‐device] <device> Specify target device
‐‐grub[‐device] <device> Specify device for installing GRUB2
bootloader
‐‐skip‐grub Skip GRUB2 reinstall

Delete:
‐‐delete Delete snapshot
‐‐delete‐all Delete all snapshots

Global:
‐‐snapshot‐device <device> Specify backup device (default: con‐
fig)
‐‐yes Answer YES to all confirmation
prompts
‐‐btrfs Switch to BTRFS mode (default: con‐
fig)
‐‐rsync Switch to RSYNC mode (default: con‐
fig)
‐‐debug Show additional debug messages
‐‐verbose Show rsync output (default)
‐‐quiet Hide rsync output
‐‐scripted Run in non‐interactive mode
‐‐help Show all options

Examples:

timeshift ‐‐list timeshift ‐‐list ‐‐snapshot‐device /dev/sda1
timeshift ‐‐create ‐‐comments "after update" ‐‐tags D timeshift
‐‐restore timeshift ‐‐restore ‐‐snapshot ’2014‐10‐12_16‐29‐08’
‐‐target /dev/sda1 timeshift ‐‐delete ‐‐snapshot
’2014‐10‐12_16‐29‐08’ timeshift ‐‐delete‐all

Notes:

1) ‐‐create will always create a new snapshot
2) ‐‐check will create a snapshot only if a scheduled snapshot
is due
3) Use ‐‐restore without other options to select options inter‐
actively
4) UUID can be specified instead of device name
5) Default values will be loaded from app config if options are
not specified
 
Old 08-24-2021, 12:03 AM   #9
flos
Member
 
Registered: Feb 2009
Location: Shropshire, UK
Distribution: Mint
Posts: 30

Rep: Reputation: 2
GUI to command line

As far as I understand things, graphical user interfaces (GUIs) merely interpret the user's mouse-clicks into command lines which are silently sent to the backend process. So Timeshift _must_ have command options which are not documented. Those would include the ones that determine which backups are to be scheduled, e.g. how many monthly (or daily or weekly) backups to keep.
A lot of reading around indicates to me that the author didn't think of making the time of day a user option for the timing of creating backups. I appreciate that the organisers of linux distributions would consider Timeshift a useful tool. On Mint Linux, its use is fairly thrust at users. I find it odd that they would do that with an application that is incompletely documented. (?)
Things might be better in the high echelons of Mint 20.2, but I can't go there yet because I can't (so far) get any sound out of my machine with those distros. (I'm not interested in video).
Don't get me wrong - I'm extremely grateful to those brilliant chaps who make Linux such a useful OS.
Extremely grateful.
flos

Last edited by flos; 08-24-2021 at 12:04 AM.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Getting TimeShift to work on a new 120 GB SSD Ari Passopolis Linux - Software 2 01-08-2015 10:11 AM
[SOLVED] Timeshift 1.4.1 gael33 Linux - Software 12 03-05-2014 07:13 PM
[SOLVED] Cursor does not move to the bottom line and overwrite to same line on command line mesuutt Linux - Newbie 3 02-25-2012 08:04 AM
xine command line? or some other command line only engine? lumix Linux - Software 2 08-10-2007 10:46 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 03:05 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration