Transfer TimeShift file to USB flash drive [Solved]

Quick to answer questions about finding your way around Linux Mint as a new user.
Forum rules
There are no such things as "stupid" questions. However if you think your question is a bit stupid, then this is the right place for you to post it. Stick to easy to-the-point questions that you feel people can answer fast. For long and complicated questions use the other forums in the support section.
Before you post read how to get help. Topics in this forum are automatically closed 6 months after creation.
Ricker

Transfer TimeShift file to USB flash drive [Solved]

Post by Ricker »

Hello,


How do I Transfer the TimeShift file to USB flash drive..??

I don't see the flash drive in the file manager.?

Thanks





(Still a Newbie)
Last edited by LockBot on Wed Dec 28, 2022 7:16 am, edited 3 times in total.
Reason: Topic automatically closed 6 months after creation. New replies are no longer allowed.
Mattyboy

Re: Transfer TimeShift file to USB flash drive

Post by Mattyboy »

Use the

Code: Select all

cd
command to get to your timeshift partition

Example.

Code: Select all

cd /mnt/timeshift/timeshift
Use

Code: Select all

ls
to list the folders within
Then the cp copy command

Code: Select all

sudo cp -R snapshots-daily/ ~/Desktop
replace snapshots-daily/ with whatever folder you wish to copy.
replace ~/Desktop with the path to your USB ( think it'll need to be formatted to ext4 )

Use

Code: Select all

lsblk
with the USB mounted to see its path and the path to timeshift

More information about these commands can be found here https://www.computerhope.com/unix.htm
User avatar
slipstick
Level 6
Level 6
Posts: 1071
Joined: Sun Oct 21, 2012 9:56 pm
Location: Somewhere on the /LL0 scale

Re: Transfer TimeShift file to USB flash drive

Post by slipstick »

I let timeshift store snapshots on my internal hard drive on a separate partition, but I keep a copy on an external USB hard drive which I update every day or two. I use a script file with rsync to keep the snapshot structure intact with all the hard links.

Code: Select all

#!/bin/bash
#update timeshift backup on external drive from snapshots on internal HD

sudo rsync -aAuHXvis --progress --delete --numeric-ids /media/root/LM18_timeshift/ /media/steve/Z97_LM_Backup/LM18.3_timeshift_backup/timeshift | tee ~/timeshift_backup_log

echo "Finished updating timeshift backup"

sleep 10
exit 0
I probably have more options in that than I really need, but it seems to work fine.
In theory, theory and practice are the same. In practice, they ain't.
Ricker

Re: Transfer TimeShift file to USB flash drive

Post by Ricker »

Mattyboy wrote: Tue Apr 24, 2018 10:25 pm Use the

Code: Select all

cd
command to get to your timeshift partition

Example.

Code: Select all

cd /mnt/timeshift/timeshift
Use

Code: Select all

ls
to list the folders within
Then the cp copy command

Code: Select all

sudo cp -R snapshots-daily/ ~/Desktop
replace snapshots-daily/ with whatever folder you wish to copy.
replace ~/Desktop with the path to your USB ( think it'll need to be formatted to ext4 )

Use

Code: Select all

lsblk
with the USB mounted to see its path and the path to timeshift

More information about these commands can be found here https://www.computerhope.com/unix.htm
At the moment I have the flash drive format with ext4 and made one snap shot with Timeshift..


No such file or directory... :(

cd /mnt/timeshift/timeshift
Ricker

Re: Transfer TimeShift file to USB flash drive

Post by Ricker »

slipstick wrote: Tue Apr 24, 2018 10:41 pm I let timeshift store snapshots on my internal hard drive on a separate partition, but I keep a copy on an external USB hard drive which I update every day or two. I use a script file with rsync to keep the snapshot structure intact with all the hard links.

Code: Select all

#!/bin/bash
#update timeshift backup on external drive from snapshots on internal HD

sudo rsync -aAuHXvis --progress --delete --numeric-ids /media/root/LM18_timeshift/ /media/steve/Z97_LM_Backup/LM18.3_timeshift_backup/timeshift | tee ~/timeshift_backup_log

echo "Finished updating timeshift backup"

sleep 10
exit 0
I probably have more options in that than I really need, but it seems to work fine.

I have a failing hard drive and need to move the system and programs to another location.. Then restore to a new SSD..
User avatar
slipstick
Level 6
Level 6
Posts: 1071
Joined: Sun Oct 21, 2012 9:56 pm
Location: Somewhere on the /LL0 scale

Re: Transfer TimeShift file to USB flash drive

Post by slipstick »

Ricker wrote: Tue Apr 24, 2018 10:53 pmI have a failing hard drive and need to move the system and programs to another location.. Then restore to a new SSD..
In that case, Aptik may be your best bet:
http://www.teejeetech.in/p/aptik.html
Ricker wrote: Tue Apr 24, 2018 10:53 pmNo such file or directory... :(
If you are on LM18, you timeshift snapshots will probably be at /media/root/timeshift
In theory, theory and practice are the same. In practice, they ain't.
User avatar
AZgl1800
Level 20
Level 20
Posts: 11183
Joined: Thu Dec 31, 2015 3:20 am
Location: Oklahoma where the wind comes Sweeping down the Plains
Contact:

Re: Transfer TimeShift file to USB flash drive

Post by AZgl1800 »

I would suggest you refrain from storing the Timeshift files on the HDD period.

Make a habit of plugging in a extUSB HDD, and then do a manual Create Timeshift.

that is what I do, and have never had a problem.
I use a laptop as a daily driver, so keeping a USB drive plugged in "all the time" is not possible.
that is why I use Manual Only mode.

IMO, there is not need for hourly, or even, daily backups.
I only make them when I make a change to the OS, install a new app, etc...

this practice has worked out extremely well for me, I had installed Snapper and found out it won't work with ext4 filesystem. so, I just backed up the the Timeshift file before it was installed, wallah! no Snapper anymore.


you can see my methodology here.
https://i.imgur.com/mR7KIhn.png
LM21.3 Cinnamon ASUS FX705GM | Donate to Mint https://www.patreon.com/linux_mint
Image
Cosmo.
Level 24
Level 24
Posts: 22968
Joined: Sat Dec 06, 2014 7:34 am

Re: Transfer TimeShift file to USB flash drive

Post by Cosmo. »

Ricker wrote: Tue Apr 24, 2018 10:12 pm How do I Transfer the TimeShift file to USB flash drive..??
Not doable. It will break the hardlinks in the snapshots and following that the snapshots themselves.
Mattyboy

Re: Transfer TimeShift file to USB flash drive

Post by Mattyboy »

Ricker wrote: Tue Apr 24, 2018 10:48 pm


No such file or directory... :(

cd /mnt/timeshift/timeshift
These are examples of the commands you need to run, you need to identify the source path of the files you wish to copy/backup then the destination path of where you wish to copy them ( your USB ).

As others have pointed out this will only make a back up of your time shift files. Which is fine but it will break the usable paths ( that again ). If you restore the backed up files on the USB back to their original location then they should work.

If you want to set the USB as the default location of where timeshift stores its files you can do so, do this within the program itself, but remember the USB will have to be plugged in for this to work.

Nothing wrong with making periodic backups of your timeshift files to another location.
Last edited by Mattyboy on Wed Apr 25, 2018 11:54 am, edited 1 time in total.
User avatar
slipstick
Level 6
Level 6
Posts: 1071
Joined: Sun Oct 21, 2012 9:56 pm
Location: Somewhere on the /LL0 scale

Re: Transfer TimeShift file to USB flash drive

Post by slipstick »

Cosmo. wrote: Wed Apr 25, 2018 5:38 am
Ricker wrote: Tue Apr 24, 2018 10:12 pm How do I Transfer the TimeShift file to USB flash drive..??
Not doable. It will break the hardlinks in the snapshots and following that the snapshots themselves.
I use the script in post #3 above to transfer the TS snapshots from my internal HDD to my external USB HDD, and as far as I can determine, the copy on the USB drive is an identical copy to the one on the internal drive, hard links and all.

Screenshot of the backup on my external USB drive
TS_Backup_ScrnShot1.png
Down one level to see all the snapshots on that drive
TS_Backup_ScrnShot2.png
Down another level to see only the daily snapshots
TS_Backup_ScrnShot3.png
In theory, theory and practice are the same. In practice, they ain't.
User avatar
slipstick
Level 6
Level 6
Posts: 1071
Joined: Sun Oct 21, 2012 9:56 pm
Location: Somewhere on the /LL0 scale

Re: Transfer TimeShift file to USB flash drive

Post by slipstick »

Down another level to show one snapshot
TS_Backup_ScrnShot4.png
In theory, theory and practice are the same. In practice, they ain't.
User avatar
AZgl1800
Level 20
Level 20
Posts: 11183
Joined: Thu Dec 31, 2015 3:20 am
Location: Oklahoma where the wind comes Sweeping down the Plains
Contact:

Re: Transfer TimeShift file to USB flash drive

Post by AZgl1800 »

your eyes must be better than mine, those fonts are so tiny, I can't even make out the text.
even with the blown up full screen view.
LM21.3 Cinnamon ASUS FX705GM | Donate to Mint https://www.patreon.com/linux_mint
Image
Ricker

Re: Transfer TimeShift file to USB flash drive

Post by Ricker »

I had to reformat the 8GB USB flash drive with the LM menu USB Stick Formatter and then deleted the TS snap shot on HD. I ran TS again with no time schedule selected and then select the TS wizard. Selected the USB flash drive as the TS storage device... :)

At the moment the Linux Mint system is saving the TS snap shot on the USB flash drive.... :D

My next project will be to save Fire fox and the bookmarks... :)

The Linux Mint document and picture folders can be sent to a USB HD FAT32 folder... :)
User avatar
slipstick
Level 6
Level 6
Posts: 1071
Joined: Sun Oct 21, 2012 9:56 pm
Location: Somewhere on the /LL0 scale

Re: Transfer TimeShift file to USB flash drive

Post by slipstick »

AZgl1500 wrote: Wed Apr 25, 2018 12:47 pm your eyes must be better than mine, those fonts are so tiny, I can't even make out the text.
even with the blown up full screen view.
Click with your mouse on the screen shot and it will open a new window or tab with the expanded view that you can read.
In theory, theory and practice are the same. In practice, they ain't.
User avatar
slipstick
Level 6
Level 6
Posts: 1071
Joined: Sun Oct 21, 2012 9:56 pm
Location: Somewhere on the /LL0 scale

Re: Transfer TimeShift file to USB flash drive

Post by slipstick »

Ricker wrote: Wed Apr 25, 2018 1:10 pm The Linux Mint document and picture folders can be sent to a USB HD FAT32 folder... :)
But saving to a FAT format you lose the ownership and permissions.
In theory, theory and practice are the same. In practice, they ain't.
Cosmo.
Level 24
Level 24
Posts: 22968
Joined: Sat Dec 06, 2014 7:34 am

Re: Transfer TimeShift file to USB flash drive

Post by Cosmo. »

slipstick wrote: Wed Apr 25, 2018 11:43 am I use the script in post #3 above to transfer the TS snapshots from my internal HDD to my external USB HDD
Tony George (TS developer) provided some time ago a command for moving, but he stated at the same time, that this is not recommended. Following that I will stay for the question for moving snapshots with the answer, which I gave. Tony said here the same.
User avatar
AZgl1800
Level 20
Level 20
Posts: 11183
Joined: Thu Dec 31, 2015 3:20 am
Location: Oklahoma where the wind comes Sweeping down the Plains
Contact:

Re: Transfer TimeShift file to USB flash drive

Post by AZgl1800 »

Ricker wrote: Wed Apr 25, 2018 1:10 pm My next project will be to save Fire fox and the bookmarks... :)

All you need to do, is setup Firefox Sync, and select Bookmarks.
I have been doing that for years, you will never loose your bookmarks that way.

IF, you think that your local copy of bookmarks is corrupted. disconnect the Internet.
Now, open up FF Library by clicking on Bookmarks "Show all"

Now in the Library, delete everything period.

exit Firefox.
Restart Firefox and wait, if you have a large number of Bookmarks, it can take quite a while to download them all again. Once they are totally downloaded, it will then sort them in the original manner that they were.

I have performed this many, many times. It never fails.

Usually, it is because I just made a fresh install of Linux/Windows on a new machine, or in Virtualbox.

FF Sync is golden. use it.
if you make a local copy of Bookmarks, always use the .json method, the html method does not preserve things accurately.
LM21.3 Cinnamon ASUS FX705GM | Donate to Mint https://www.patreon.com/linux_mint
Image
Klaas Vaak

Re: Transfer TimeShift file to USB flash drive

Post by Klaas Vaak »

slipstick wrote: Tue Apr 24, 2018 10:41 pm I let timeshift store snapshots on my internal hard drive on a separate partition, but I keep a copy on an external USB hard drive which I update every day or two. I use a script file with rsync to keep the snapshot structure intact with all the hard links.

Code: Select all

#!/bin/bash
#update timeshift backup on external drive from snapshots on internal HD

sudo rsync -aAuHXvis --progress --delete --numeric-ids /media/root/LM18_timeshift/ /media/steve/Z97_LM_Backup/LM18.3_timeshift_backup/timeshift | tee ~/timeshift_backup_log

echo "Finished updating timeshift backup"

sleep 10
exit 0
I probably have more options in that than I really need, but it seems to work fine.
Slipstick, I have a very basic question, and I apologise if it annoys you: where do you store the script and, even more importantly, how do you run a script?
User avatar
slipstick
Level 6
Level 6
Posts: 1071
Joined: Sun Oct 21, 2012 9:56 pm
Location: Somewhere on the /LL0 scale

Re: Transfer TimeShift file to USB flash drive

Post by slipstick »

Klaas Vaak wrote: Sat Mar 09, 2019 9:34 am Slipstick, I have a very basic question, and I apologise if it annoys you: where do you store the script and, even more importantly, how do you run a script?
I don't know why you think I might be annoyed by your question - I'm always happy to answer a question when I know the answer (and sometimes when I don't :) ). Just store the script in a file - I end all my script file names with ".sh" and store them in my /home/<my user name>/bin folder. I call this one update_timeshift_backup.sh. Give the file execute permission - mine has -rwx------ permission. Be sure to modify the source and destination in the rsync statement to match your system. To make it easy to launch, I have created a launcher on my desktop. On Cinnamon, just right click on the desktop and select the option "Create a new launcher here". Name the launcher, enter the path and filename in the "Command" box (or use the browse button), and check the box "Launch in terminal".

Be aware that this process takes a while to run - typically 15-20 minutes on my system. It first deletes all the out of date snapshots from the USB drive, then appears to do nothing for about 10 minutes, then begins writing the new snapshots to the USB drive. At the end, the USB drive should have a duplicate of the snapshots on the internal HDD. You might prefer not to use the script and just add snapshots to your USB drive by changing the destination in TimeShift to make an On-demand snapshot to USB, then change the destination back to internal disk. That way you can have one set of snapshots on internal HDD and another on USB drive. They won't be exactly the same, but that really shouldn't matter. The reason I do it with the script is - first, I like having an exact duplicate (no good reason, really), and second, running the script is less work - just plug in the USB drive and click on the launcher. Otherwise, I would have to open TS, click on Setting, then on Location, then on the USB drive, then close that window, then start a snapshot, then at the end, change the destination back and close TS. The script would probably run faster if you delete the log file it keeps, if you don't want that - in the rsync line you would erase the part on the end of the line | tee ~/timeshift_backup_log.
In theory, theory and practice are the same. In practice, they ain't.
cliffcoggin
Level 8
Level 8
Posts: 2297
Joined: Sat Sep 17, 2016 6:40 pm
Location: England

Re: Transfer TimeShift file to USB flash drive

Post by cliffcoggin »

slipstick wrote: Wed Apr 25, 2018 1:14 pm
AZgl1500 wrote: Wed Apr 25, 2018 12:47 pm your eyes must be better than mine, those fonts are so tiny, I can't even make out the text.
even with the blown up full screen view.
Click with your mouse on the screen shot and it will open a new window or tab with the expanded view that you can read.
Even then it isn't easy for some of us old codgers.

PS. I have just realised the significance of your nickname and picture. I recently rediscovered my 52 year old slide rule and found I could still use it!
Cliff Coggin
Locked

Return to “Beginner Questions”