How Do I Backup My Xubuntu (Or Any Linux )Install To An Image File?

blackneos940

Active Member
Joined
May 16, 2017
Messages
347
Reaction score
207
Credits
332
Hellooo..... :3 So I get the general idea..... I can use DD, Brasero, etc., but I wanna' use DD..... :3 The goal is to create an image of Xubuntu on my ASUS X205TA to the Hard Drive on a Server me and a friend have..... That way, we can access Files without turning this Netbook into a Server, having to Port Forward, set a Port Number, navigate the Router interface, blegh..... :p Plus, backups will be easier, even though this thing is more of a Thin Client..... :3 So guys, any ideas.....? :) Thank you for any help..... I REALLY appreciate it!..... :D
 


Hi buddy! I'm not familiar with using dd to make an image... are you sure you can browse the files inside it afterwards? This actually sounds like a perfect job for rsync to me. You could run it manually to synchronize with the server, or run it in a cron job to automate the backups.

Cheers
 
Clonezilla

Clonezilla is a partition and disk imaging/cloning program
 
Hi buddy! I'm not familiar with using dd to make an image... are you sure you can browse the files inside it afterwards? This actually sounds like a perfect job for rsync to me. You could run it manually to synchronize with the server, or run it in a cron job to automate the backups.

Cheers
Hi Homer!..... :3 Maybe rsync is what I need after all!..... :3 And I think it can be run all from within a running OS!..... :3
 
Ok guys, so I tried using rsync to copy Files to mah Server, but I'm getting permission errors and Directory errors, even with sudo or su..... :( I'll post the output here, as well as the string of Commands used:

Code:
sudo rsync -avzh -e /home/adam/ "ssh -p xxxxx" [email protected]:/home/adam/;
Where all the x's are a Port Number and an IP Address..... I literally trust all of you, but since this is a public forum..... :\

Pretty much all the Mods here know my name, and I'm not hiding bodies in my foundation, so..... :) Anywho, here's the output.....

rsync: Failed to exec /home/adam/: Permission denied (13)
rsync error: error in IPC code (code 14) at pipe.c(85) [sender=3.1.2]
rsync: connection unexpectedly closed (0 bytes received so far) [sender]
rsync error: error in IPC code (code 14) at io.c(235) [sender=3.1.2]

Thanks for any help!..... :D Waiting on you, guys!..... ;)
 
I'll try to give a look over the syntax, but this isn't my strong point. And I'll only be able to play over a local LAN instead of a true remote server. Maybe @Rob or @JasKinasis will jump in with some pointers?

Cheers
Ok Homer!..... :3 Thanks buddy!.... :3 Local LANs have IPs, right.....? :3
 
Hey Adam... took me awhile to learn new things! :eek::confused::D I'm still not real clear on all the details, but I did just manage to rsync a folder from one computer to another on my home network. sudo is not required for rsync, but you will be prompted for a password on the remote server. (And I don't think you can do this as root, but must be a regular user.)

*** Required for BOTH computers: openssh-client and openssh-server
*** Required for BOTH computers: firewall access for ssh through whatever ports you have set for that.
(I cheated and disabled the firewall on both computers to make it work. :eek::eek::eek:)

This is my example that is working:
Code:
rsync -avs /home/stan/test [email protected]:/home/stan/Desktop

The -s option allows filenames with whitespace, a very handy option for me after I discovered (long ago) that some files were not being backed up properly. I might also suggest the --delete option which will delete any files in your destination if you delete them in your source. One other suggestion that you might want to consider is --exclude-from=FILE.... because you may decide that many of the hidden files and folders in your home folder do not need to be transferred to the remote server. Each item, file or folder, would need to be entered on a line by itself in a simple text file. I've used this in the past because, as I remember, there may be a few files that do not want to transfer with rsync and will cause errors, and so it was easier just to exclude those problems. Whether or not these options are right for you is your decision.

One last option I'll mention is -n .... which will give you a "dry run" and show you just about the full output as if you were really transferring files, but you're not. It could help you a lot if you see any potential errors before you actually run the full rsync backup, and especially since your /home folder is likely to be quite large.

So, here is an example that should, I hope, work for you after you enter in the correct IP address and have firewall access. This is the "dry run" version with --delete also, although there is nothing to delete on a first run.
Code:
rsync -navs --delete /home/adam/ [email protected]:/home/adam

Oops, one more detail to explain. Note in the code example for you that there is a trailing slash in the source location of /home/adam/ .... that is assuming that you already have a folder on the remote destination named /home/adam. The trailing slash on the source means that it will copy all of the loose files and folders in the source to the destination. Otherwise, it would create another adam folder in your destination, like /home/adam/adam

Good luck! :D
 
Otherwise, it would create another adam folder in your destination, like /home/adam/adam
Hmmm, maybe you would rather do that?!?! After thinking a bit more, I'm wondering if you are already a regular user on the destination server? You may not want to replace all your /home files and folders on the destination! Think about it, anyway. Maybe it will be better to make a new /home/adam/backup folder or something to store your Lubuntu files.

Cheers
 
NICE work, Stan ... I will digest that more on my tomorrow :)

And Adam, I have not forgotten you, I will get back to that conversation, likewise, tomorrow

Cheers

Wiz
 
BTW, Homer is not just a pretty face
 
Hmmm, maybe you would rather do that?!?! After thinking a bit more, I'm wondering if you are already a regular user on the destination server? You may not want to replace all your /home files and folders on the destination! Think about it, anyway. Maybe it will be better to make a new /home/adam/backup folder or something to store your Lubuntu files.

Cheers
Thanks for your help, Homer!..... :3 Actually, I already prepared a Folder on the Server called Adam_X205TA or something like that..... :) I'm really starting to like this rsync thing!..... :D Also, you reminded me... I need to set up a Firewall..... :( Also, aren't you worried about posting your I.P. on a public forum.....? :( Wait, it isn't Port Forwarded, so..... ;)
 
NICE work, Stan ... I will digest that more on my tomorrow :)

And Adam, I have not forgotten you, I will get back to that conversation, likewise, tomorrow

Cheers

Wiz
Ok..... :3 I've got some cool plans involving me and my friend's Server..... :3
 
@atanere Ok..... :3 I tried the Command, and everything worked, until..... It said "connection refused"..... :< I know why; it wants a Port number, but how do I specify it with rsync.....? :3 Make sure you hide yo' Port number with X's boi!!..... :3
 
You almost had it right above! I think you're right... connection refused is likely because of the port number. Below is an example from the web... note the single quotes instead of double quotes. I also think the single quotes must follow the -e option... you had them separated.
Code:
rsync -navs -e 'ssh -p XXXX' --delete /home/adam [email protected]:/home/adam/Adam_X205TA

This time, I removed the trailing / character in the example, so it would copy the "adam" folder on the source into the "Adam_X205TA" folder on the destination server. Of course, replace XXXX with the correct port number on the destination server. If you can ssh into that port number, then I think this rsync command should work too.

Success?
 
Also, aren't you worried about posting your I.P. on a public forum.....? :( Wait, it isn't Port Forwarded, so..... ;)
Right, the local LAN is not accessible from the web. But... those still might be bogus IP addresses on the local LAN too. :confused::D
 
You almost had it right above! I think you're right... connection refused is likely because of the port number. Below is an example from the web... note the single quotes instead of double quotes. I also think the single quotes must follow the -e option... you had them separated.
Code:
rsync -navs -e 'ssh -p XXXX' --delete /home/adam [email protected]:/home/adam/Adam_X205TA

This time, I removed the trailing / character in the example, so it would copy the "adam" folder on the source into the "Adam_X205TA" folder on the destination server. Of course, replace XXXX with the correct port number on the destination server. If you can ssh into that port number, then I think this rsync command should work too.

Success?
And VOILA!!..... :D It WORKS!!!..... :D :D :D I've got liek 60-somethin' free GB on the Server's Hard Drive, so there's more than enough room..... ;) Well, what a great two days: I found the plastic piece that goes onto my X205TA Netbook near the bottom, got it to stay on so my Display wires didn't get ruined by anything external, and my buddy Homer helps me out with the rsync I.P. problem!!..... :D Thanks buddy..... :3 Also, I should have guessed that your local LAN I.P.s could be bogus too, since Wardriving is a thing..... :( Scary..... :(
 

Staff online

Members online


Top