Stop all services for a backup of /varHaving tried differen ways but none worked - How do I disable a service from auto-start at boot in Ubuntu?How system services are started in 12.10?No message appears when using notify-send inside a service, why?Shutting down ALL services (server backup)How to stop all services except ssh?How to stop all servicessystemd service failed with dependency

Simulating these special dice on more regular dice

ld linker ignores LD_LIBRARY_PATH

Black screen for 1-2 seconds while alt-tabbing a fullscreen game or using a Windows key

Can I be fired the same day that I hand in my notice?

How do I limit the use of projectiles in a high fantasy world?

Why is JavaScript not compiled to bytecode before sending over the network?

Filter 500 files with awk, then cat results to single file

Why can't I use zsh?

Query execution plan is horrible until Statistics are Updated

Is there a BIOS setting that controls cpu load sharing?

is there a way to check a debug statement belongs to which class

Keeping an healthy immune system on a generation-ship

What is the etymology of the phrase 隴を得て蜀を望む?

Mincha torah reading before a chag

Expectation of 500 coin flips after 500 realizations

Sci-fi novel from 1980s(?) about colony on Mars

Am I obligated to pass on domain knowledge after being let go?

What item could this PCB board be from? (NOT serious, misc. question)

How do I fix these gaps where the socket plates don't cover?

Unknown musical symbol

How long should a hash be to be absolutely secure?

Can I leave my car sitting outside for about 5 years?

Is there a age limit to become a CFI?

Tips for golfing javascript code, especially converting while loop to expression



Stop all services for a backup of /var


Having tried differen ways but none worked - How do I disable a service from auto-start at boot in Ubuntu?How system services are started in 12.10?No message appears when using notify-send inside a service, why?Shutting down ALL services (server backup)How to stop all services except ssh?How to stop all servicessystemd service failed with dependency






.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty
margin-bottom:0;









0


















I wrote a script for backing up /etc, /home and /var as .tgz-files and copying them on a windows disk in the network.
As I tested the script everything worked perfectly. But now I always get the error that some data changed during reading them.
All of the errors are on /var and I think they are all because some service is running. I changed the script, so it would stop the apache2 and mysql services while packing the archives. But I still got the errors.



So my question is:



Is there a way to stop all services which are using /var?



I hope you can help me.
Have a nice day and thank you.










share|improve this question

























  • I don't think there is much of a point of backing up data that changes that often. It depends on what you want to use the backup for. If you need to e.g. restore a database, a simple cp with the server running is not going to work, but other means are available. As it stands, your question sounds like an XY Problem.

    – Jos
    Sep 29 at 15:47











  • Well I think i was too lazy. Will change my script so it will only backup some dirs from /var. Thank you anyway.

    – Holger Piechulla
    Oct 1 at 6:01

















0


















I wrote a script for backing up /etc, /home and /var as .tgz-files and copying them on a windows disk in the network.
As I tested the script everything worked perfectly. But now I always get the error that some data changed during reading them.
All of the errors are on /var and I think they are all because some service is running. I changed the script, so it would stop the apache2 and mysql services while packing the archives. But I still got the errors.



So my question is:



Is there a way to stop all services which are using /var?



I hope you can help me.
Have a nice day and thank you.










share|improve this question

























  • I don't think there is much of a point of backing up data that changes that often. It depends on what you want to use the backup for. If you need to e.g. restore a database, a simple cp with the server running is not going to work, but other means are available. As it stands, your question sounds like an XY Problem.

    – Jos
    Sep 29 at 15:47











  • Well I think i was too lazy. Will change my script so it will only backup some dirs from /var. Thank you anyway.

    – Holger Piechulla
    Oct 1 at 6:01













0













0









0








I wrote a script for backing up /etc, /home and /var as .tgz-files and copying them on a windows disk in the network.
As I tested the script everything worked perfectly. But now I always get the error that some data changed during reading them.
All of the errors are on /var and I think they are all because some service is running. I changed the script, so it would stop the apache2 and mysql services while packing the archives. But I still got the errors.



So my question is:



Is there a way to stop all services which are using /var?



I hope you can help me.
Have a nice day and thank you.










share|improve this question














I wrote a script for backing up /etc, /home and /var as .tgz-files and copying them on a windows disk in the network.
As I tested the script everything worked perfectly. But now I always get the error that some data changed during reading them.
All of the errors are on /var and I think they are all because some service is running. I changed the script, so it would stop the apache2 and mysql services while packing the archives. But I still got the errors.



So my question is:



Is there a way to stop all services which are using /var?



I hope you can help me.
Have a nice day and thank you.







services






share|improve this question













share|improve this question











share|improve this question




share|improve this question










asked Sep 29 at 13:07









Holger PiechullaHolger Piechulla

112 bronze badges




112 bronze badges















  • I don't think there is much of a point of backing up data that changes that often. It depends on what you want to use the backup for. If you need to e.g. restore a database, a simple cp with the server running is not going to work, but other means are available. As it stands, your question sounds like an XY Problem.

    – Jos
    Sep 29 at 15:47











  • Well I think i was too lazy. Will change my script so it will only backup some dirs from /var. Thank you anyway.

    – Holger Piechulla
    Oct 1 at 6:01

















  • I don't think there is much of a point of backing up data that changes that often. It depends on what you want to use the backup for. If you need to e.g. restore a database, a simple cp with the server running is not going to work, but other means are available. As it stands, your question sounds like an XY Problem.

    – Jos
    Sep 29 at 15:47











  • Well I think i was too lazy. Will change my script so it will only backup some dirs from /var. Thank you anyway.

    – Holger Piechulla
    Oct 1 at 6:01
















I don't think there is much of a point of backing up data that changes that often. It depends on what you want to use the backup for. If you need to e.g. restore a database, a simple cp with the server running is not going to work, but other means are available. As it stands, your question sounds like an XY Problem.

– Jos
Sep 29 at 15:47





I don't think there is much of a point of backing up data that changes that often. It depends on what you want to use the backup for. If you need to e.g. restore a database, a simple cp with the server running is not going to work, but other means are available. As it stands, your question sounds like an XY Problem.

– Jos
Sep 29 at 15:47













Well I think i was too lazy. Will change my script so it will only backup some dirs from /var. Thank you anyway.

– Holger Piechulla
Oct 1 at 6:01





Well I think i was too lazy. Will change my script so it will only backup some dirs from /var. Thank you anyway.

– Holger Piechulla
Oct 1 at 6:01










0






active

oldest

votes













Your Answer








StackExchange.ready(function()
var channelOptions =
tags: "".split(" "),
id: "89"
;
initTagRenderer("".split(" "), "".split(" "), channelOptions);

StackExchange.using("externalEditor", function()
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled)
StackExchange.using("snippets", function()
createEditor();
);

else
createEditor();

);

function createEditor()
StackExchange.prepareEditor(
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader:
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/4.0/"u003ecc by-sa 4.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
,
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
);



);














draft saved

draft discarded
















StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2faskubuntu.com%2fquestions%2f1177459%2fstop-all-services-for-a-backup-of-var%23new-answer', 'question_page');

);

Post as a guest















Required, but never shown


























0






active

oldest

votes








0






active

oldest

votes









active

oldest

votes






active

oldest

votes
















draft saved

draft discarded















































Thanks for contributing an answer to Ask Ubuntu!


  • Please be sure to answer the question. Provide details and share your research!

But avoid


  • Asking for help, clarification, or responding to other answers.

  • Making statements based on opinion; back them up with references or personal experience.

To learn more, see our tips on writing great answers.




draft saved


draft discarded














StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2faskubuntu.com%2fquestions%2f1177459%2fstop-all-services-for-a-backup-of-var%23new-answer', 'question_page');

);

Post as a guest















Required, but never shown





















































Required, but never shown














Required, but never shown












Required, but never shown







Required, but never shown

































Required, but never shown














Required, but never shown












Required, but never shown







Required, but never shown









Popular posts from this blog

Tamil (spriik) Luke uk diar | Nawigatjuun

Align equal signs while including text over equalitiesAMS align: left aligned text/math plus multicolumn alignmentMultiple alignmentsAligning equations in multiple placesNumbering and aligning an equation with multiple columnsHow to align one equation with another multline equationUsing \ in environments inside the begintabularxNumber equations and preserving alignment of equal signsHow can I align equations to the left and to the right?Double equation alignment problem within align enviromentAligned within align: Why are they right-aligned?

Training a classifier when some of the features are unknownWhy does Gradient Boosting regression predict negative values when there are no negative y-values in my training set?How to improve an existing (trained) classifier?What is effect when I set up some self defined predisctor variables?Why Matlab neural network classification returns decimal values on prediction dataset?Fitting and transforming text data in training, testing, and validation setsHow to quantify the performance of the classifier (multi-class SVM) using the test data?How do I control for some patients providing multiple samples in my training data?Training and Test setTraining a convolutional neural network for image denoising in MatlabShouldn't an autoencoder with #(neurons in hidden layer) = #(neurons in input layer) be “perfect”?