Gotenks98 Posted May 19, 2015 Share Posted May 19, 2015 I wanted to know if its possible with debian based linux system such as ubuntu to do a full OS backup over the network as a tarball? If so how? I tried doing this but it fails to create the file when I do it. Is it possible to create a "shell script" (not sure if its called that) that will install various linux apps via the apt-get and ppa's in the script. Basically I wanted to create a install.sh file that will have all the commands. When building this do I need to put sudo before every apt-get? or When I run the install.sh file via terminal and do sudo install.sh will it run everything in the script? Is it possible to make it auto say yes to all the prompts? Also I notice when installing apps you have to do a apt-get update. Does this command have to be run everything time you apt-get something? I was thinking off having the script add in all the ppa's then do one apt-get update then do the install for all apps? Would this work? The purpose of all of this is to restore all my apps as quickly as possible without having to type so much after an install whenever I try out new distro's. Link to comment Share on other sites More sharing options...
Haggis Veteran Posted May 19, 2015 Veteran Share Posted May 19, 2015 ok script wise yeah you can run it as sudo could look like this #!/bin/sh apt-get update apt-get -y install <app_1> <app_2> <app_3> the -y makes it do it without asking you to confirm for the backup i would recommend clonezilla clonezilla - http://clonezilla.org/ Backup Download iso Burn onto CD/DVD or FLASH. Boot Linux systems to clonezilla cd/dvd Use device to image - backup entire linux disk to a file(s) on your windows system. Select server for the image directory and enter the server name or IP Select savedisk Restore Boot Linux systems to clonezilla cd/dvd Use device to image Select server for the image directory and enter the server name or IP Select restoredisk fusi0n 1 Share Link to comment Share on other sites More sharing options...
+theblazingangel MVC Posted May 19, 2015 MVC Share Posted May 19, 2015 I wanted to know if its possible with debian based linux system such as ubuntu to do a full OS backup over the network as a tarball? If so how? I tried doing this but it fails to create the file when I do it. Of course. You want to bundle a bunch of files on your local system into a tar archive - very much possible; you want to transfer a file over a network to another machine - very much possible. Why don't you post a copy of the commands/code you are using along with any errors you are experiencing and someone can explain what you're doing wrong and how to do it right. Is it possible to create a "shell script" (not sure if its called that) that will install various linux apps via the apt-get and ppa's in the script. Basically I wanted to create a install.sh file that will have all the commands. When building this do I need to put sudo before every apt-get? or When I run the install.sh file via terminal and do sudo install.sh will it run everything in the script? Is it possible to make it auto say yes to all the prompts? Also I notice when installing apps you have to do a apt-get update. Does this command have to be run everything time you apt-get something? I was thinking off having the script add in all the ppa's then do one apt-get update then do the install for all apps? Would this work? The purpose of all of this is to restore all my apps as quickly as possible without having to type so much after an install whenever I try out new distro's. Absolutely. You should run the script as sudo, negating the need to use sudo on individual commands within the script. You can get apt-get to automatically assume yes to prompts with the command line param -y. Read the man page! You would probably need to run the script as sudo ./install.sh (assuming it exists within the current working directory), not sudo install.sh. You do not need to do an apt-get update before every apt-get install. apt-get update updates a local database, used by apt, of what packages and what versions of those packages are available. The command apt-get upgrade checks for and allows you to install any updates to the collection of packages you already have installed. You generally need to do an apt-get update before using apt-get upgrade to actually update your local copy of the database, which apt-get upgrade will then analyse. When installing a new package with apt-get install, you do not necessarily have to do an apt-get update to update this database before hand. If for some reason you want to do a series of apt-get install commands one after another, it is absolutely fine to do just one apt-get update before hand, if one is even needed at all. Certainly doing one for each and every apt-get install in such an scenario would be a waste of time and resources. Note that not every application you want will necessarily be available within another distribution, or available with the exact same package name. Also, not every distribution uses apt for package installation. Fedora uses yum for example, and arch uses pacman. Note that you can actually ask apt-get to install more than one package at the same time, just by listing them one after another with a space inbetween each one, i.e. sudo apt-get install package1 package2 package3. So you could more simply just list all the packages that you want in a text file, and then copy and paste that on the end of an 'apt-get install' command, rather than creating such a shell script. Link to comment Share on other sites More sharing options...
Gotenks98 Posted May 19, 2015 Author Share Posted May 19, 2015 Awsome. Both answers are going to help me a ton. One other question if I was going to install linux on hundreds of workstations what would be the best method to ensure each install is identical in terms of apps and such. I know on Windows you can sys prep an then image and restore. Does linux have anything like sys prep to ensure each systems software is the same but the GUID of each system is unique? Link to comment Share on other sites More sharing options...
Recommended Posts