Cluttermagnet Posted October 11, 2019 Share Posted October 11, 2019 (edited) Hi, All- Recently one of my Desktops with Linux Mint began to overrun the limited disk space on my tiny 60G Corsair flash drive. Root had pretty much completely filled the tiny 17.66G partition I had it in. No big deal- I had a spare Drevo 120G flash drive to throw in that tower (Dell Precision T3400). I figured I would simply clone the 60G drive onto the 120G. Hilarity ensued... I had set up the new 120G drive with bigger partitions and I figured Clonzilla would respect the new boundaries on that drive. Nope. Clonezilla made an absolutely identical clone of what was on the 60G drive- just as it is supposed to do- overwriting my attempt at resizing the partitions. D'oh!!! (Homer Simpson slaps self on forehead)... Well, OK, now I have more room, so I can move the extended partition sda2, making room to enlarge root in sda1. D'oh!!! Nope, it's an extended partition containing swap plus /home. Gparted wouldn't let me move that extended partition. Heh! So I cogitated on this little problem another day or so and it eventually occurred to me that I could image /home, erase sda2 and every- thing in it. Then Gparted would allow me to resize sda1... I ended up using Bing (Bootit NG EMBRL 2.02) to do the imaging onto another conventional SATA HDD. An oldie but goodie. I dunno, it's just something I'm familiar with, and it lets you mouse in (I think) a DOS-like environment. Anyway that later turned out to have gone very well.... Now I could use Gparted to remove the extended partition and its contents, and I did so. Resized root, sda1 upwards, then added back an extended partition as before for swap and /home. Then back to Bing 2.02 to slap an image of /home back in there. So far as I know Mint is still booting and working. I might add that Clonzilla 2.5.2.17 served me very well in creating the original drive-to-drive clone. So here is a screen save from Gparted of what I ended up with: https://i.imgur.com/dDSNLxq.jpg Spoiler What is a "spoiler'? And where is the button to link to an Imgur photo??? The point of all this is that I figured out something, more or less, on my own, and I owe a lot to the guys and gals who hang out in Scot's Forums for coaching and encouraging me as I struggled to learn Linux starting in 2007. I'm most grateful! Clutter Edited October 12, 2019 by Cluttermagnet Confusion 4 Quote Link to comment Share on other sites More sharing options...
V.T. Eric Layton Posted October 12, 2019 Share Posted October 12, 2019 OK, then... For starters, the button to add an image is in the lower right hand corner of the editor (the little window where you're typing your post). Here's a pic: And now for a little advice... In the future, if you have an issue like you mention above where you're trying to clone or copy data from one drive to another, do it the easy way. - First set up the partitions on your new larger drive any way you want. - Second, using Rsync or, if you prefer, Grsync (graphic version) and sync the partitions on your old drive to their corresponding partitions on the new drive. - All will sync perfectly as long as your new partitions are larger than the filled-up old partitions from the older drive. Easy-peasy! This is the method I use to backup my Linux OS and Data Partitions to a mirrored drive. I do this every Sunday. You can't go wrong with Rsync. You can screw up, though, so be careful. ;) For Windows partitions (NTFS or Fat), just use Clonezilla. It's the best for that job. Oh! And a "Spoiler" is when you're discussing a book or movie on the forum and you're considerate enough to post the details of the story within the Spoiler box to give individuals a choice as to whether or not they want to read that part of the post. Have fun! 5 Quote Link to comment Share on other sites More sharing options...
securitybreach Posted October 12, 2019 Share Posted October 12, 2019 Nice and hiya Clutter I use Clonezilla to clone my installation drive every few months. I have only had to restore it once in years but I still overwrite the previous one every couple of months. I use rsync as well but I use to mirror folders on multiple drives as a backup solution that runs as a daily cronjob (cronie). Rsync is a very useful tool and is simple to use!! You can back up locally or over a network automatically via a cronjob or just a single use. https://wiki.archlinux.org/index.php/Rsync 4 Quote Link to comment Share on other sites More sharing options...
V.T. Eric Layton Posted October 12, 2019 Share Posted October 12, 2019 Hey brother Josh... I'll have one for you: Have a great weekend! 2 Quote Link to comment Share on other sites More sharing options...
securitybreach Posted October 12, 2019 Share Posted October 12, 2019 4 minutes ago, V.T. Eric Layton said: Hey brother Josh... I'll have one for you: Have a great weekend! Nice I hope that you have a good one as well my friend. 2 Quote Link to comment Share on other sites More sharing options...
Cluttermagnet Posted October 12, 2019 Author Share Posted October 12, 2019 (edited) Thanks, Guys- What threw me off is the "other media" . That made me picture (pun intended) getting my thumb drive out, etc. What's wrong with a separate button for photos? One that actually looks like a photo. Like in the old days when graphical interfaces were more intuitive. I'm just sayin'... Clutter Edited October 12, 2019 by Cluttermagnet 1 Quote Link to comment Share on other sites More sharing options...
Cluttermagnet Posted October 12, 2019 Author Share Posted October 12, 2019 (edited) Quote First set up the partitions on your new larger drive any way you want. - Second, using Rsync or, if you prefer, Grsync (graphic version) and sync the partitions on your old drive to their corresponding partitions on the new drive. - All will sync perfectly as long as your new partitions are larger than the filled-up old partitions from the older drive. Yep, sounds perfect, Eric. That's just what I had in mind when I partitioned the new flash drive. But then I used the 'wrong' utility. Nonetheless, Clonzilla did indeed do it's job perfectly. As a first pass, I'll look into the 'easier' graphical method Grsync. Remembering way back to the era of Bruno, I recall him telling me (in so many words) that 'we don't do imaging in Linux like is frequently done in MS Windows'. I'd have to go back about 12 years to find that thread. Now I'm reconsidering... Clutter Edited October 12, 2019 by Cluttermagnet 1 Quote Link to comment Share on other sites More sharing options...
Cluttermagnet Posted October 12, 2019 Author Share Posted October 12, 2019 3 hours ago, securitybreach said: Nice and hiya Clutter I use Clonezilla to clone my installation drive every few months. I have only had to restore it once in years but I still overwrite the previous one every couple of months. I use rsync as well but I use to mirror folders on multiple drives as a backup solution that runs as a daily cronjob (cronie). Rsync is a very useful tool and is simple to use!! You can back up locally or over a network automatically via a cronjob or just a single use. https://wiki.archlinux.org/index.php/Rsync I'm so grateful you guys are still here when I need help, Josh. Well my somewhat older copy of Clonezilla performed very well for me. I am definitely rethinking the imaging thing now. Clutter 2 Quote Link to comment Share on other sites More sharing options...
securitybreach Posted October 12, 2019 Share Posted October 12, 2019 8 hours ago, Cluttermagnet said: I'm so grateful you guys are still here when I need help, Josh. Well my somewhat older copy of Clonezilla performed very well for me. I am definitely rethinking the imaging thing now. Clutter Always glad to help out 1 Quote Link to comment Share on other sites More sharing options...
V.T. Eric Layton Posted October 12, 2019 Share Posted October 12, 2019 12 hours ago, Cluttermagnet said: What's wrong with a separate button for photos? One that actually looks like a photo. Like in the old days when graphical interfaces were more intuitive. Oh, that would be way too easy. Quote Link to comment Share on other sites More sharing options...
securitybreach Posted October 12, 2019 Share Posted October 12, 2019 (edited) 18 minutes ago, V.T. Eric Layton said: Oh, that would be way too easy. I prefer the current way of doing it. Edited October 12, 2019 by V.T. Eric Layton Edited because I'm OCD and left out the 2nd O in "too". ;) 1 Quote Link to comment Share on other sites More sharing options...
V.T. Eric Layton Posted October 12, 2019 Share Posted October 12, 2019 12 hours ago, Cluttermagnet said: Well my somewhat older copy of Clonezilla performed very well for me. If Clonezilla works for you, stick with it. Rsync doesn't "image" a drive. It copies all data bit by bit from the source partition/drive and then writes it exactly the same way on the destination partition/drive. It's not an image. It's actually a Copy/Paste procedure. Command Line Rsync will be a bit confusing to non-CLI users. I would recommend the graphic version. It comes with Porteus (portable Slackware-based Linux). You just plug in your Porteus thumb drive and boot up from that device. Once you're in Porteus, you can bring up the terminal and use it to open Grsync with root privileges. user@porteus~:$ su -- enter password -- user@porteus~:$ toor root@porteus~:$ grsync The most important thing about using Rsync or Grsync is that you must NOT forget to add the following / to the source variable. If you forget, Rsync will still copy/paste the data, but it will put it on the destination its own directory. That's NOT what you want when you're mirroring. Sample Rsync input: Source: /mnt/sda1/ <-- this is the IMPORTANT slash mentioned above. Destination: /mnt/sdb1 What you're actually doing in the above sample is telling Rsync that you want to copy ALL data from /dev/sda1 partition to the /dev/sdb1 partition. Anyway, if you ever want to play around with Rsync in the future, just give Josh or myself a holler. He's going to be the pro with the CLI version. I most often use the graphic version because I'm lazy... er, I mean laid back. 2 Quote Link to comment Share on other sites More sharing options...
securitybreach Posted October 12, 2019 Share Posted October 12, 2019 Rsync with crontab is pretty simple. The syntax for cron jobs are minute, hour, day of month, day of week and then the command. So in the following the first entry runs at 3:00 pm (1500) every day of week/month. The last entry dumps the trash folder every Tuesday at 11pm (2300). The rsync is as follows -ar means preserve permissions(a) and recursive (r). --deletes means that files deleted on the source are to be deleted on the backup too. Cerberus :: ~ » crontab -l 00 15 * * * rsync -ar --delete /Various/comhack/Downloads /Various/comhack/Miscellaenous /Various/comhack/Pictures /Various/comhack/scripts /Various/Music /Backup1/comhack/ 00 16 * * * rsync -ar --delete /Various/comhack/Documents /MEDIA/ 00 17 * * * rsync -ar --delete /Backup2/Movies/ /Various/Movies/ 00 17 * * * rsync -ar /Various/New/Done /Backup1/ 00 17 * * * rsync -ar /MEDIA/TV /Backup1/ 00 23 * * 2 rm -rvf /home/comhack/.local/share/fff/trash/* The last entry is because you cannot turn off the trash option in fff yet so I just dump the directory every so often. You can also set an rsync as a simple daily cron job instead of specifying what day and time: https://wiki.archlinux.org/index.php/Rsync#Automated_backup 2 Quote Link to comment Share on other sites More sharing options...
Cluttermagnet Posted October 12, 2019 Author Share Posted October 12, 2019 Thanks, Guys- I'll return to this and study it until I'm sure I 'get it'. Not sure if I will set up cron jobs or not. For starters, merely learning and internalizing these methods would be enough for me. FWIW the partition on the SATA HDD I used to stash the image was set up FAT32. I remember hearing a while back that this is a good, general purpose setup and that files could be moved from and to Linux partitions no problem (like EXT3 and EXT4). Clutter 3 Quote Link to comment Share on other sites More sharing options...
V.T. Eric Layton Posted October 12, 2019 Share Posted October 12, 2019 I use a common storage partition on my system that is FAT32. This way I can easily store data there that I have in common between my Windows and Linux operating systems. That partition also gets mirrored onto my backup drives on a regular basis. This comes in handy for me because I don't care to surf some of the sites I visit using Windows. An example is the site I use for gaming mods. I go there in Linux, download whatever I need to the common storage partition and then later, when I'm in Windows, I scan it for ca-ca and then install it. Quote Link to comment Share on other sites More sharing options...
sunrat Posted October 13, 2019 Share Posted October 13, 2019 Just to confuse you even more, you can set up rsync to run as a systemd service with a systemd timer. Or even run it to watch folders for changes as shown in SB's above linked Arch wiki page. However, I just use Syncthing for that. The cron method is probably a touch easier for starters though. 1 Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.